Click here to Skip to main content
15,917,636 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
You find that one of your validations is very complicated and does not fit in any of the validators, what will you do?
Posted
Comments
Nithin Sundar 13-May-11 6:24am    
Your question is not clear. What programming language are you using and what kind of validation do you mean? Can't you write a method/function to take care of validating whatever data is acquired or something?
Sergey Alexandrovich Kryukov 13-May-11 6:36am    
Sound too artificial. School, interview question..?
--SA
Sandeep Mewara 13-May-11 12:20pm    
Bingo! ;)

Validation of the validator? I'm confused...
 
Share this answer
 
Comments
CPallini 13-May-11 8:05am    
Who validates the Validator? :-)
I assume you are using .Net as your language. You may want to read more about RegularExpressionValidator.
Here [^] is an overview of the ASP.Net validators.
 
Share this answer
 

  • Write the complex validator for it.


or


  • Embed it into a more generic (simpler) validation rule. Of course that implies discarding some of the required constraints, you'll end up with less precision but the trade-off might be acceptable.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900