Skip to content
Advertisement

Serialize form validation Laravel 8

could not validate an array of input in laravel 8. from the frontside I have gotten the serialized form data which was successfully accessible from the backend.

JavaScript

what I want is to validate the form inside the update function before I update the data when the user changes.

JavaScript

what I have tried on the validation function is below

JavaScript

looking recommendation to solve this issue.

JavaScript

Advertisement

Answer

Try the validation like this.

JavaScript

Validator::make uses the Validator facade to create a validator instance for you. Nothing more. You have to execute the validation and implement the error handling yourself.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement