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

Form Validation always errors #74

Closed
nickyeoman opened this issue Apr 27, 2019 · 1 comment
Closed

Form Validation always errors #74

nickyeoman opened this issue Apr 27, 2019 · 1 comment

Comments

@nickyeoman
Copy link

if(!empty($validator->failed()) or !empty($errors)){

$validator->failed()
will only be empty when no validation is used. When a form is valid this is returned:

Array ( [Your Name] => Array ( [Required] => Array ( ) ) [Your Email] => Array ( [Required] => Array ( ) ) ) 

In order to fix this you need to do something like foreach array[key]->Required if empty.

Or maybe I'm missing something?

@nickyeoman
Copy link
Author

More info, when I disabled $validator->failed() it looks like the ajax has removed the content of your name and your email, maybe the issue is there.

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