Posted: 10 Jun 2015 6:55 EDT Last activity: 10 Jun 2015 10:46 EDT
Quiz question on Validating User Input lesson
The following question from the quiz:
Validating user input against a range of values is best accomplished: (Choose One)
Setting the “Min/Max chars” value on the form control
Using a Validate rule
Using the “Display and Validation” settings on the property
Setting the “Min/Max chars” values on the property
In order to pass the quiz the user needs to select Using a Validate rule as the only possible answer.
However, at least in my opinion, Using the “Display and Validation” settings on the property may be a better option depending on the context:
If the range of possible values depends on the property's context, then a Validate rule is the best option. For example, Financial Plan might have different ranges of possible values depending on other Input, e.g. Customer Status (Gold, Silver, etc..)
If the property has an invariable range of possible values, e.g. Gender, I think it makes more sense to define it at the Property lelevl using Display and Validation settings.
I wrote that question - and now you have me worried that it may be too nuanced.
It seems we can all agree that setting min/max characters is useless for validating what is entered; regardless of where we set the limits. That leaves us with a Validate rule and Display and Validation settings on the property.
The Display and Validation settings on any given property are limited to specifying the UI control type and constraining the available values:
Because I want to evaluate the user input and measure it against a range of acceptable values, a Validate rule is the only option left.
Did I make this question too nuanced?
Posted: 6 years ago
Posted: 10 Jun 2015 10:15 EDT
Juan Cortines (cortj)
Senior Principal Software Engineer, Case Runtime
I understand that technically speaking contraining is not the same as validating. However, and please correct me if I'm wrong, in PRPC's jargon contraining the values is also a kind of Validation (please refer to Validating Data Elements in Essentials I).
That, plus the fact that the settingssection is called DISPLAY AND VALIDATION, makes it really hard to 100% figure out the right answer to this question.
Posted: 6 years ago
Posted: 10 Jun 2015 10:42 EDT
Eddie Moczygemba (eddie.jm)
Principal Release Engineer, Community Experience and Engagement