If you mean html form, so you can do it on server or client side for validation on the client side you can use javascript http://www.w3schools.com/js/js_validation.asp or use a js frameworks like a jquery just try to use google
Just remember, NEVER trust client side validation -- even if you have the scripttardery or HTML 5, crackers can slap that aside as if it doesn't even exist so you HAVE to re-check things server-side... But the question becomes, what DATA are you validating? What information is the form sending? How many fields are we talking; so few you can hand code it, or so many you'd be better off building an array that builds the form for output and could be leveraged for validation as well? You're not quite telling us enough about what you have, where you are going, and what your applicable skillset even is.