Server Side Validation
In the Server Side Validation, the input submitted by the user is being sent to the server and validated using one of the server side languages such as ASP.Net, PHP, JAVA etc. After the validation process on the Server Side, the feedback is sent back to the client's web browser page.
Server side validation protect against the malicious users, who can easily bypass your Client Side scripting language and submit dangerous input to the server.
Client Side Validation
- When you perform a Client Side Validation, all the user inputs validated in the user's browser itself.
- In tis validation you can provide a better user experience by responding quickly at the browser level.
- Client Side validation does not require a round trip to the server, so the network traffic which will help your server perform better.
- This type of validation is done on the browser side using scripting languages such as JavaScript or HTML5 attributes.
Description:
- We have used common class in span named with .error and placed above each field.
- Created a Boolean function in JavaScript that will handle the validation.
- We have used Regular expression to match the name because we want to validate name with only character and space.
No comments