I have went through most of the form validation for asp.net mvc like IDataErrorInfo, Xval, ValidationToolkit etc. This is specific with phone numbers or credit card validation where your model will have a property called "Phone" or "CreditCardNumber" but the UI/view will display the values in three text boxes( by splitting 3-3-4 in each text box). So how to get these three inputs in "Phone" field and validate them separately in the model like
- First input - cannot start with 0
- second input - should have 3 numbers.
- third input - should have 4 numbers.
then display/add error style for all of the three textboxes using any of the above given validations( prefer to use IDataErrorInfo)
Let me know if any other thread has solutions.
Thanks in advance.