Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

non negative integer validation laravel

namespace ModulesRewardPointHttpRequests;

use IlluminateFoundationHttpFormRequest;

class UserPointsUpdateRequest extends FormRequest
{

    public function authorize()
    {
        return true;
    }

    public function rules()
    {
        return [
            'points' => 'required|numeric|gt:0'
        ];
    }
}
 
PREVIOUS NEXT
Tagged: #negative #integer #validation #laravel
ADD COMMENT
Topic
Name
6+2 =