Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Laravel Add regx on password

In Controller/Request

 'password' => ['required', 'string','max:255', 'min:8', 'confirmed', 'regex:/[0-9]/', 'regex:/[a-z]/', 'regex:/[A-Z]/'],

In Blade

//8 characters minimum, 1 capital letter minimum, 1 small letter minimum, 1 number minimum.
<input class="form-control type="password" name="password" id="password" 
 pattern="(?=.*d)(?=.*[a-z])(?=.*[A-Z]).{8,}" title="8 characters minimum, 1 capital letter minimum, 1 small letter minimum, 1 number minimum." required>
Comment

PREVIOUS NEXT
Code Example
Php :: how to escape html tags in php 
Php :: datetime format laravel 
Php :: laravel get latest record by date 
Php :: php code to hide plugin update for wordpress 
Php :: php artisan make:request 
Php :: mysql timestamp format php 
Php :: current date in carbon 
Php :: Interval Between Different Dates 
Php :: php array of objects filter 
Php :: include a website in php file 
Php :: redirect wordpress 
Php :: wp_query limit 1 
Php :: validate timestamp php 
Php :: php string replace space 
Php :: laravel gigapay update employee 
Php :: how to check php string length 
Php :: undefined variable _session 
Php :: Error: Call to a member function getClientOriginalName() on null in file /usr/local/var/www/murabaha_backend/app/Http/Controllers/Traits/MediaUploadingTrait.php 
Php :: php artisan serve 
Php :: checks input if number only in php 
Php :: how login one user with id in laravel 
Php :: wordpress get site url 
Php :: php check credit card expiration 
Php :: websocket 2006 MySQL server has gone away 
Php :: laravel naming conventions 
Php :: get_boundary_post wordpress 
Php :: php substr remove last 4 characters 
Php :: cut out the beginning of the text in php 
Php :: Laravel loop iternation pagination issue 
Php :: laravel debug 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =