Skip to content

Instantly share code, notes, and snippets.

@alloyking
Created August 12, 2013 12:26
Show Gist options
  • Save alloyking/6210392 to your computer and use it in GitHub Desktop.
Save alloyking/6210392 to your computer and use it in GitHub Desktop.
Laravel extend validator
<?php namespace Services\Validators;
class Step1 extends Validator{
//rules for step1 validation
public static $rules = array(
'email' => 'required',
'firstname' => 'required',
'lastname' => 'required',
'system_key' => 'required|systemcheck',
);
//custom message
public static $messages = array(
'systemcheck' => 'This ID has already been registered',
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment