Suppose you want to make sure that admin_code should always be equal to admin, you can use laraval validators like this:
Regex:/^([a-z])+$/i The field value must match the provided regular
expression.
$rules = [
'email' => 'required|email|max:255|unique:users',
'password' => 'required|min:6',
'admin_code' => 'required|regex:^admin$>',
];
In:small,medium,large Ensure that the value is contained within the
list of values provided.
$rules = [
'email' => 'required|email|max:255|unique:users',
'password' => 'required|min:6',
'admin_code' => 'required|in:admin>',
];
http://laravelbook.com/laravel-input-validation/