This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// this file is meant for use with laravel 4 | |
// it can be placed in the root of the app directory | |
// and included from routes.php | |
// validate alphabetical chars & spaces only | |
Validator::extend('alpha_space', function($attr, $value) { | |
return preg_match('/^([a-zA-Z ])+$/i', $value); | |
}); |
NewerOlder