app/Http/Requests/HotelFormRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules() {
        return [
            'name' => 'required|between:3,60',
            'code' => 'required|between:2,6',
            'latitude' => 'required|regex:/^[\d]{2}\.[\d]{6}$/',
            'longitude' => 'required|regex:/^[\d]{2}\.[\d]{6}$/',
            'description' => 'between:100,500', 
            'terms_and_conditions' => 'between:100,500', 
        ];
    }
public function rules ( ) { return [ 'name' => 'required|between:3,60' , 'code' => 'required|between:2,6' , 'latitude' => 'required|regex:/^[\d]{2}\.[\d]{6}$/' , 'longitude' => 'required|regex:/^[\d]{2}\.[\d]{6}$/' , 'description' => 'between:100,500' , 'terms_and_conditions' => 'between:100,500' , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .
// nullable // nullable