I have a problem with backpack request files. Everything works fine locally, but when the project is in Google Cloud, in the forms, no alert pops up when I save the entire form blank or with data that doesn't meet the rules, and I get the following error:
Locally, the alerts defined by the rules appear in the request files, correctly:
Along with the field marked with red:
All alerts work locally and since they are in Google Cloud they are ignored.
This is my Request file:
public function rules()
{
return [
'short_name' => 'required|min:5|max:70'
];
}
public function messages()
{
return [
'short_name.required' => 'El nombre corto es requerido',
'short_name.min' => 'El nombre corto debe contener 5 caracteres como mínimo',
'short_name.max' => 'El nombre corto debe contener 70 caracteres como máximo'
];
}
The following appears in the stackdriver error report:
PHP Notice: Illuminate\Validation\ValidationException: The given data was invalid. in /srv/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php:130
Illuminate\Foundation\Http\FormRequest->validateResolved (/srv/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php:130)
In the app.yaml file I had the following:
It was enough to make the change to:
And the validations already appear in Google Cloud, it was all