I am using Validation Rules to validate a set of textboxes.
The rules work perfectly.
The Rules specify that the Textbox input is invalid under
-> Value is empty
-> Value is not matchin Regex xxx
My concerns here are :
1) If i set ValidatesOnTargetUpdated="True" it gives me the ugly border with a axterix at the start itself ! Any work around here? coz both the conditions are necessary i.e not null and matching regex.
2) Even if the Textboxes are invalid , The submit button still works and takes in the invalid input and process with processing . Can we handle the Validation errors in Codebehind in a easier way?
We can get the binding expression and check if it has errors with Has Error, But if i have 15 textboxes My validation function would get really long and it doesnt serve the purpose validation is built for. There;s just too muc to code for this simple check.
Any workaround for this?
Or Any workaround for a completely different validation mechanism that would reduce Code behind manual check on errors .
View Complete Post