How to implement numeric value length limit in Laravel 10?
P粉899950720
P粉899950720 2023-08-09 14:49:31
0
1
590
<p>Is this the correct way to validate a numeric value in a tinyint(4) field? </p> <p>This is the command I'm currently using</p> <pre class="brush:php;toolbar:false;">['required', 'numeric', 'max:4']</pre>
P粉899950720
P粉899950720

reply all(1)
P粉204136428

According to Laravel Documentation, you can use max_digits:

['required', 'numeric', 'max_digits:4']
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!