Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

validation order and selective validation

Status
Not open for further replies.

KnotGoblin

Technical User
Jan 4, 2005
77
0
0
US
I have a few questions about form validation.

First let me describe the page:
It contains a datagrid. the datagrid has two columns with data. the datagrid has a footer in which the user can add new records. I am also using "in-grid-editing". I am using validator controls to validate the new values submitted in the footer--a RequiredFieldValidator for each value and a CustomValidator for one of those two values.

first question (not necessarily a problem): I have looked but not found much info on how and what order the validators are executed. if the requiredField validator validates then the customValidator is not evaluated? so the custom validator is only evaluated if the requiredfield validator passes. i've tried changing the order in which the validators are on the page, but that doesn't seem to make a difference. can someone explain how and what order the validators are evaluated.

the second problem:i added requiredfield validators to the the textboxes for the in-line edits. if the required field doesn't validate it evalutes the validators for the footer text boxes. can i specify which fields to validate based on which submit button is clicked?

-Jer
 
Let me add to the second part:
if the field being editted doesn't validate then it goes on to evaluate the footer requiredfield validators in which case they don't validate.
otherwise, if the field being editted validates then the footer field validators are not evaluated.

-Jer
 
sorry i keep posting.

but if i remove the requiredfield validator from the textbox that also has the custom validator. customvalidator is never evaluated.

-Jer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top