WithValidation returns unvalidated (raw) data #4051
joelharkes
started this conversation in
General
Replies: 1 comment 1 reply
-
Good to know we build our own validation rules, eg: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When using the
WithValidation
interface, it validates the input data but actually drops the validated data and instead just returns the raw data. In Laravel normally you call:This avoids any data being injected by mistake outside the validation rules. Laravel Excel just drops the validated data and keeps te original data.
To avoid this I have to wrap my code to execute again the validation rules, for example:
Ideally Laravel Excel I could decide wether or not i want the raw unvalidated data or validated data based on an interface?
Beta Was this translation helpful? Give feedback.
All reactions