While testing, system always returning me required customized message. For example i want the validator to check if the passwords match. But error message shows me "Password Validation is required" instead of "Passwords does not match".
Here is my validation function and rules.
protected function getRegisterValidator()
{
$message = array(
'same' => ':attribute ve :other tekrarları birbirini tutmalı.',
'between' => ':attribute en az :min en fazla :max karakterden oluşabilir.',
'min' => ':attribute en az :min karakter içermelidir.',
'max' => ':attribute maksimum :max karakterden oluşabilir.',
'alpha_num' => 'girilen :attribute alfanumerik olmalıdır.',
'unique' => 'Bu :attribute ile zaten önceden kayıt olunmuş.',
'email' => ':attribute geçerli bir mail adresi değil.',
'captcha' => 'Doğrulama karakterlerini yanlış girdiniz.',
'required' => ':attribute alanı boş olamaz.'
);
return Validator::make(Input::all(),array(
'Kurum' => 'required',
'Ad' => 'required',
'Soyad' => 'required',
'Görev' => 'required',
'Email' => 'required|email|unique:user',
'Email Tekrarı'=> 'required|same:Email',
'Şifre' => 'required|between:8,12',
'Şifre Tekrarı' => 'required|same:Şifre',
'Doğrulama' => 'captcha|required'
), $message);
}
Thanks in advance.