Skip to content
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

'required': true marked under layout still allows you to submit form without filling required field #13

Open
sunnydsouza opened this issue May 16, 2024 · 0 comments

Comments

@sunnydsouza
Copy link

I was looking at your playground example
https://hamidihamza.com/ajsf/?set=asf&example=asf-hack-conditional-required&framework=material-design&language=en
I can see that under 'layout' ('form') we have

"switch",
{
"key": "email",
"condition": "model.switch",
"required": true
},

So, email is marked required in the layout, but after check marking the 'Spam Me'(switch) button, though email is marked required and shows with * in the Ui, the submit button is still enabled and user is allowed to submit.

Expected behaviour: User should be allowed to submit when switch is false, but if true, shouldnt be allowed to submit until email is filled in and submitted.

@sunnydsouza sunnydsouza changed the title 'required': truw marked under layout still allows you to submit form without filling required field 'required': true marked under layout still allows you to submit form without filling required field May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant