class RegRequest extends BaseRequest
{
public function rules()
{
return [
'l_name' => 'required|string|max:255',
'f_name' => 'required|string|max:255',
'm_name' => 'nullable|string|max:255',
'contact' => [
'required',
is_numeric($this->contact) ? 'digits:12' : 'email',
'unique:users,phone',
'unique:users,email',
],
'pass' => 'required|string|min:6|confirmed',
];
}
}