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
Php :: return back in blade laravel 
Php :: convert multi-dimensional array into a single array in laravel 
Php :: htaccess php version 
Php :: mysqli loop 
Php :: laravel foreach loop index from 1 
Php :: php mongodb version cmd 
Php :: php array merge skip diplicate 
Php :: php token generator 
Php :: count words in string php 
Php :: foreach loop 1-100 php 
Php :: laravel count group by date 
Php :: wordpress add to cart redirect php 
Php :: wherebetween date laravel 
Php :: php capitalize first letter 
Php :: how to change date formate in laravel 
Php :: var dump php look clear 
Php :: get image width and height in laravel 
Php :: php json request get value of an array element 
Php :: php empty object 
Php :: how to send ajax request in laravel 
Php :: php delete json object from a collection object 
Php :: continue not in the loop or switch 
Php :: laravel model update 
Php :: php remove duplicates from multidimensional array 
Php :: how to get a whole number from decimal in php 
Php :: Fatal error: Allowed memory size of 1610612736 bytes exhausted 
Php :: for in php 
Php :: get static front page 
Php :: laravel validation mimes always fails 
Php :: File Reading Mode PHP 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =