foo.blade.php
<input type="text" name="national-id" />
FooController.php
$rules = [
'national-id' => 'required|size:10|numeric'
];
the national-id
field should contain 10
digits
and I actually expected the code above to validate this , but instead It will check If the national-id
exactly equals to 10 or not ...
how can I validate the length
of a numeric field?
digits:10
means: "must be exactly 10 digits" (not less not more) – Toandfro