-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Do not validate length and input rule if attribute value is required but empty #22003
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
Do not validate length and input rule if attribute value is required but empty #22003
Conversation
Hi @VincentMarmiesse. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@param array|string $value
such value as null
must not be passed to this method. Please filter it out on higher level.
@orlangur Ok so you want me to change these lines: https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Eav/Model/Validator/Attribute/Data.php#L128-L130 right? We could change it to
what do you think? |
@VincentMarmiesse please update PR, or we will close it as inactive. |
Hi @engcom-dev-Foxtrot, |
It does not make sense to validate the value that equal to null. |
Hi @sidolov, thank you for the review.
|
… is required but empty #22003
Hi @VincentMarmiesse, thank you for your contribution! |
Hi,
Description (*)
The EAV text attribute validation continues even if a required attribute is required but has no value.
It raises the error
when creating a customer without a required attribute with GraphQL for example.
Manual testing scenarios (*)
createCustomer
but without setting this required attribute"Attribute" is a required value.
Contribution checklist (*)