Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

required if null / require without laravel

public function rules()
{
    return [
        'user_id'       => 'exists:users,id',
        'email'         => 'required_without:user_id|email|unique:users,email',
        'password'      => 'required_without:user_id',
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #required #null #require #laravel
ADD COMMENT
Topic
Name
4+4 =