validation on exact length of numeric field in laravel 5 -
i have numeric field want validate on exact fill 4 digits.
like: 1234, 4567,1245
but these invalid inputs: like: 123, 346, 45m6, 34567
what trying:
'last4digits' => 'numeric|between:4,4',
you looking digits
rule. from docs:
the field under validation must numeric , must have exact length of value.
'last4digits' => 'digits:4'
Comments
Post a Comment