Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

laravel custom exists rule with different exist ID

$activationCode = $request->activation_code;                                   

$rules = [                                                                     
    'mc' => [                                                                  
        'required',                                                            
        Rule::exists('email_verifications', 'machineCode')                     
        ->where('activationCode', $activationCode),                                                                    
    ],                                                                         
    'activation_code' => 'required|integer|min:5',                             
    'operating_system' => 'required|alpha_num|max:45'                          
];
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #custom #exists #rule #exist #ID
ADD COMMENT
Topic
Name
8+5 =