-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValidatorStep | Can't set option for Constraint Collection allowExtraFields #302
Comments
If you deactivate the strict mode, the validator will only validate the fields which have an constraint. |
@Baachi - there is no setStrict on the ValidatorStep class. There is one on the ValidatorFilter but since the Workflow doesn't seem to be a concretion anymore, I can only use steps that implement PriorityStep - whilst my old 'Workflow' object is now a StepAggregator. Which means I only have ValidatorStep available to me - which doesn't seem to have a setStrict method https://github.com/ddeboer/data-import/blob/master/src/Step/ValidatorStep.php |
@Baachi - if I implement the isStrict logic in ValidatorStep as it's done on ValidatorFilter, then setting isStrict(false) works great. Should I push a PR for this or is there a reason this was excluded from ValidatorStep in 0.19.0? |
Not in the step, but in the ValidatorFilter. Feel free to open a PR, to implement that feature in the |
Thanks @Baachi. One thing - I'm unsure how ValidatorFilter features in the new Workflow. In 0.18 we had a concrete Workflow class. That class had StepAggregator itself does not have an Thus, at least, on my first glance, I don't see a way to fit the filters into the "workflow" (ie StepAggregator). Make sense? Or am I missing something more fundamental in the change from 0.18 to 0.19? |
HI @kyleobrien91 and @Baachi I've created a pull request with this option included, can you please take a look: #311 |
Can't currently set flag in ValidatorStep to ignore extra fields in $item object when validating.
@Baachi @ddeboer @sagikazarmark - is this something I can achieve someway else? Otherwise, can I go ahead and create a PR for this?
The text was updated successfully, but these errors were encountered: