app/Http/Requests/HotelsFormRequest.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_without_all:latitude,longitude|between:3,60',
            'latitude' => 'required_without_all:name|required_with_all:longitude|regex:/^[\d]{2}\.[\d]{6}$/',
            'longitude' => 'required_without_all:name|required_with_all:latitude|regex:/^[\d]{2}\.[\d]{6}$/',
        ];
    }
public function rules ( ) { return [ 'name' => 'required_without_all:latitude,longitude|between:3,60' , 'latitude' => 'required_without_all:name|required_with_all:longitude|regex:/^[\d]{2}\.[\d]{6}$/' , 'longitude' => 'required_without_all:name|required_with_all:latitude|regex:/^[\d]{2}\.[\d]{6}$/' , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .