public function rules()
{
return [
'name' => 'required|string|min:2|max:30',
'email' => ['required', 'email', Rule::unique('users', 'email')->ignore($this->id)],
'password' => 'min:8',
'role' => 'required'
];
}
}
public function rules()
{
return [
'title' => ['required', Rule::unique('vh_nodes', 'title')->ignore($this->id)],
'url' => 'required',
'login' => 'required',
'password' => 'required',
];
}
{{ old('name') }}
возвращает валидатор. Request точно, другие не использовал. @if(\Request::input('ref'))
@endif