Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ...->with(A-Z);
- $rules = array(
- 'description' => 'required|naughtywords',
- );
- Validator::extend('naughtywords', function($attribute, $value, $parameters)
- {
- return strpos($str, 'a***') === FALSE
- });
- $messages = array(
- 'naughtywords' => 'The :attribute must not contain naughty words',
- );
- Validator::make(Input::all(), $rules, $messages);
Advertisement
Add Comment
Please, Sign In to add comment