Skip to content

Instantly share code, notes, and snippets.

View iolson's full-sized avatar

Ian Olson iolson

  • Grubhub
  • Chicago, IL
View GitHub Profile
@iolson
iolson / passwordvalidation
Last active August 29, 2015 14:25 — forked from Michael-Brooks/passwordValidation.php
Laravel Password validation Regex (Contain at least one uppercase/lowercase letters and one number)
/*
* Place this with the rest of your rules.
* Doesn't need to be in an array as there are no pipes.
*/
$rules = array(
'password' => 'required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/'
);
/*
* Use this one if you also require at least one symbol.