The widget validation is a great new feature. A couple suggestions for making it even better:
Perform the validation on loss of focus for the widget. Requiring a keystroke (enter) does not always align to the desired usability (e.g. scanning data into multiple fields)
Perform the validation if the assigned variable is updated or allow validation on a text variable widget. When auto-calculating a value for the user there is frequently still and expectation that it will conform to various rules.
Hi @Lance could you explain your exact use case a bit more? Are you referring to input validation on form input fields? If so, the validation rules should execute on loss of focus and not require an extra keystroke or user action, but I’m most likely missing something about your use case.
I think you are right on this point.
But if you put in your values by scanning, you will not have a real focus on the input widget. Also when you have a form with several inputs and the operator doesn’t touch one of them (but Input is required) it will not display that.
Maybe a trigger function Update in put validity check for all or selected widgets would be great because you could put that on any other action.
(If you mar a field as required the message only gets displayed, when you focus the input and unfocus it again.
But if you are not willing to type something, you would not focus this input … that makes not a lot of sense…
Also: If you check the validity in an if clause this should highlight the errors on the widgets that failed the validity test.
(e.g.: If input validity on all inputs true then … this should cause the error formatting to get applied if false! Otherwise you wouldn’t know whitch one failed!)
Hey Chris,
I am building a batch record app where one of the fields that must be displayed is calculated from prior entries (e.g. net weight = final weight - empty weight). I also want to indicate to the user if the ‘net weight’ is outside of expectations and potentially preclude them from moving forward if it is not. The validations on the input widgets would give exactly the desired behavior but the highlighting (for failed validation checks) does not show up after assigning the value as it would if the user were to type it in.
I’ll double check my team’s comment that change of focus is not also triggering the highlighting.
@Lance thanks for your response and more details - would this mean that your first suggestion might not solve the issue? Seems like you want the validation errors to display automatically after the input is filled out, in this case not by manual typing.
Perform the validation on loss of focus for the widget.
@shep all I can tell you is that with our current trigger logic that calculates and assigns the value to the variable of the widget we are not seeing the validation highlighting when the value it outside the assigned range.