Asp code validating a form
Build and run the application, submit decimal numbers in different cultures and see how client side validation works.
If the application will use numbers in non-Latin cultures (e.g.
Till noe everything seems to be okay, but if you type decimal numbers in non-English cultures (e.g.
15,5), you will see validation error messages; Because some non-English cultures uses comma ( , ) as decimal separator, while it is ( . Client side validation depends on “jquery.validate.js”, it is developed considering English standards and it uses dot ( . In order to fix this; we have to add more scripts to our “_Validation Scripts Partial”.
Thanks Ok, now you have to ask yourself some questions about how you want your site to work, A) Client-side scripting B) Server-side scripting C) Both Client and Server side scripting Of these, A) has the most risks as anyone could damage it B) has the drawback of multiple trips to the server C) requires more work So...
go to a scripting site ( such as and get some basic form validation routines.
Download and install the following packages: These files contains defintions for all cultures and their numbering formats.
The application will target the selected culture scripts to read numbering formats and apply it during client side validation.
The user chooses by clicking on a radio button corresponding to the choice they want, then they type in a textbox the required information, so if they chose last name, then they have to type a surname in the text box.Upon submitting it, it goes to a process page which validates the choices then redirects to another page, showing the information the user requested. I was wondering how would i go about validating the radio buttons and the textbox.Like if they choose the surname radio button then the textbox must not include any numbers, or if they choose customer number then the textbox must contain numbers only.Please remember to be considerate of other members.If you are new to the CNET Forums, please read our CNET Forums FAQ.