Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel validate enum field

$validator = Validator::make(Input::only(['username', 'password', 'type']), [
    'type' => 'in:DEFAULT,SOCIAL', // DEFAULT or SOCIAL values
    'username' => 'required|min:6|max:255',
    'password' => 'required|min:6|max:255'
]);
Comment

laravel enum validation

 'type' => 'in:DEFAULT,SOCIAL'
Comment

laravel enum validation

use AppEnumsServerStatus;
use IlluminateValidationRulesEnum;
 
$request->validate([
    'status' => [new Enum(ServerStatus::class)],
]);
Comment

PREVIOUS NEXT
Code Example
Javascript ::  
::  
::  
::  
::  
::  
::  
::  
::  
:: adding jquery from console 
::  
:: 2x speed youtube 
::  
::  
::  
::  
::  
::  
::  
::  
::  
::  
::  
::  
:: send json post ajax javascript 
Javascript ::  
::  
::  
::  
::  
ADD CONTENT
Topic
Content
Source link
Name
4+9 =