Validating a custom date format in with laravel validator - development

Validating a custom date format in with laravel validator

In my app, the user selects date from a datepicker and the date is then displayed in the input in a format that corresponds user’s locale.

When the form is submitted, I would like to validate the respective date, however, the validator does not know the date format that the date was submitted in.

My question is whether I should mutate the date into Y-m-d before it is passed to validator or is there a way I can tell the Validator the right format to validate in?



from Laravel Questions and Answers https://laravelquestions.com/php/validating-a-custom-date-format-in-with-laravel-validator/
via Lzo Media

Comments

Popular posts from this blog

ng-show doesn’t work correct with value boolean

ng-include of inline SVG does not display gradient except in Chrome

Using PHP and MySQL data to generate PDF letters like in MS Word mailmerge functionality - development