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

Display Error message on form submit for required fields #155

Open
AndreasMySch opened this issue Feb 13, 2024 · 1 comment
Open

Display Error message on form submit for required fields #155

AndreasMySch opened this issue Feb 13, 2024 · 1 comment

Comments

@AndreasMySch
Copy link

Is there a default "display error on form() submit" method that I can use? Or should this be built in manually? I have added "->required()" to the form fields in my form() function to show the required asterisk "*". At the moment, when leaving the field marked "required()" empty and trying to submit only this shows in the console "Form still has errors" from the open-admin-form.js file.

@RCyrix
Copy link

RCyrix commented Feb 15, 2024

You can use a hook to provide custom validation and a response you can set validation rules

Please refer to the documentation regarding Form callback and Form validation

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

2 participants