asp.net validaton methods
-
hey, i need to do form validation. need to check if fields are empty,valid email format, postal code n things like this.. how can i integrate requiredFormValidaton and regularExpression in such it will inform user if its empty n once it is filled in but input wrongly, it will only inform user of incorrect input?
-
hey, i need to do form validation. need to check if fields are empty,valid email format, postal code n things like this.. how can i integrate requiredFormValidaton and regularExpression in such it will inform user if its empty n once it is filled in but input wrongly, it will only inform user of incorrect input?
You can use more than one type of validation controls for one controls. Example: You use requiredfieldvalidator for the textbox for zipcode which check if the textbox value is empty. and to check the format of zipcode value you use regularexpression validator control which will check the format of the zipcode value. Now whenever validation occurs first requiredfieldvalidator will work. If the controls is not having blank value then the regularexpressionvalidator will check the format of value and gives u error if format is not in proper way. Thanks and regards, Chetan Ranpariya.
-
You can use more than one type of validation controls for one controls. Example: You use requiredfieldvalidator for the textbox for zipcode which check if the textbox value is empty. and to check the format of zipcode value you use regularexpression validator control which will check the format of the zipcode value. Now whenever validation occurs first requiredfieldvalidator will work. If the controls is not having blank value then the regularexpressionvalidator will check the format of value and gives u error if format is not in proper way. Thanks and regards, Chetan Ranpariya.
gd afternoon, tks. But how will i format the validator for display purposes? i cant overlap the 2 validator am i right?