The user input should always validated so that we can get correct and reliable data.
For example, if you want user to input their age but if user inputs any letters then the system should not accept is as an input.
Instead it should throw an error message telling user to correct its input. Below is the code which will validate a numeric field and gives error.
Now below is the javascript:
For example, if you want user to input their age but if user inputs any letters then the system should not accept is as an input.
Instead it should throw an error message telling user to correct its input. Below is the code which will validate a numeric field and gives error.
Enter Age:
Now below is the javascript:
Comments
Post a Comment