jeudi 21 juin 2018

Laravel Validation custom format

I need to be able to specify a certain formation I want a field to be (preferably through the Laravel Request rules() function), for example, rules for a field called phone_number need to be

  • Must only contain spaces, numbers and the + symbol

and rules for a field called postcode need to be

  • Must only contain letters and numbers
  • Must be in one of the following formats (XX XXX, XX XXXX, XXXX XXX)

Is it possible to achieve this through a Custom Request file?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2tg8Pvf
via IFTTT

Aucun commentaire:

Enregistrer un commentaire