This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

short-circuiting validations

 
M Turner
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not seeing the short-circuiting in my validations behaving as I would expect according to the following documentation:


A plain Validator (non FieldValidator) that gets short-circuited will completely break out of the validation stack. No other validators will be evaluated and plain validators takes precedence over field validators meaning that they get evaluated in the order they are defined before field validators get a chance to be evaluated.


My validations are defined as:



I would expect that only 1 error message would be displayed, since it's supposed to "completely break out of the validation stack", however, I see 3 error messages. Plus, my field validations are still executing.

My goal is that if any of the strings is blank, the user will get only one message and the other field validations will get short-circuited. Do I have to use an expression to accomplish this?

TIA
 
M Turner
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After further digging I found that "expression" is the only true non-field validator which explains the behavior I was seeing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic