What are some best practice specs for form validation when collecting customer information?
The question: Are there any best practices for what validation rules should be set for each customer information field on a form?
I'm trying to create a spreadsheet that will specify how an author should handle every type of customer information field on a form (ie. first name, last name, address, city, state, zip code, email, phone number, etc.) I'm hoping that by creating this spreadsheet I'll be able to ensure that every form I create will have the same validation rules for alike fields. Therefore it will provide the best customer experience.
This spreadsheet should contain information about whether each form field will be required, what type of form field it will be, min and max length. It should also specify whether or not numbers, letters, and special characters will be allowed in each field. If any of those are allowed in a specific field it should state explicitly which numbers, letters, or special characters are acceptable.
The goal is to provide as much validation on our forms as possible without making it more of an annoyance to the user or developer. The specification / validation rules should be general enough to be transferrable to all customer information forms.