$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'
]);
'type' => 'in:DEFAULT,SOCIAL'
use AppEnumsServerStatus;
use IlluminateValidationRulesEnum;
$request->validate([
'status' => [new Enum(ServerStatus::class)],
]);
Code Example |
---|
Javascript :: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: adding jquery from console |
:: |
:: 2x speed youtube |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: send json post ajax javascript |
Javascript :: |
:: |
:: |
:: |
:: |