-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditional visibility but unconditional validation #846
Comments
Hey @theMikeD!
|
Actually, you might be able to use the |
Thanks for the tips! The main issue is that the manually-entered IP is only required if that option is selected; in all other cases it should be set to null...but the validator is checking for that and fails if it's null/empty, because if the manual option is selected, an empty value correctly fails the |
@dlh01 I'm having something similar now and I wonder if it's related. If I create a repeater using
and one of the fields in the group added by the repeater has
then the form never saves, because it's trying to enforce Is this the same problem? |
Consider the following code, in which the
manual
option ofip_option
is used to conditionally displaymanual_ip
which is a text box to allow the user to enter an IP address:If the user selects the manual option and enters a invalid IP address, you get the warning as expected:
Now the user hits the back button, and selects one of the other options (which hides the text entry) and saves...and they get the warning again. This is because TextField
validate
function is run even when thedisplay_if
is false.So here are my questions
manual_ip
in the UX?manual_ip
, and saves, is there a way to setip_option
todefault
?The text was updated successfully, but these errors were encountered: