I have this code in UserFormLaravelValidator.php
<?php namespace Authority\Service\Form\User;
use Authority\Service\Validation\AbstractLaravelValidator;
class UserFormLaravelValidator extends AbstractLaravelValidator {
protected $rules = array(
'firstName' => 'alpha',
'lastName' => 'alpha',
'email' => 'required|min:4|max:32|email|unique:users,email,8',
'gender' => 'required'
);
protected $messages = array(
//'email.required' => 'An email address is required.'
);
}
How to replace '8' in 'email' by current user id variable?
Here is a couple topics that are related to what your asking about.
http://stackoverflow.com/questions/26200274/laravel-4-unique-validation-rules-not-working
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community