-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Move first&last names in separate validation group #2840
Conversation
Hmmm... How about we name this group |
We should think about convention, because right now we use e.g. @winzou I agree to make a separate validation group for that, but I think we should add this group as default to the form, because it is useful validation for most e-commerce platforms. |
f33b413
to
5feb1bc
Compare
5feb1bc
to
45d45be
Compare
Agreed with everything. |
@michalmarcinkowski What do you think about this naming? |
no news is good news? :) |
I think we should set some convention before we merge this and follow it everywhere from now on. I was thinking that "sylius" is default group, but for extra stuff we have more expressive group names, like "sylius_name_required". What do you think about this idea? |
We will never succeed in making groups convenient for everyone. So I would suggest to have just the
The ideal solution would be to have a flexible validation system. Overriding the validation groups would be amazing, but is not possible given the current validation system. Maybe a sylius extension adding this feature? |
I agree with @winzou, we should keep it simple for now. Nice idea about the validation system, but I'm not sure we will have time for this feature in the nearest future :) One more thing, I would change groups to more specific e.g. |
Done and green :) |
Great! Thanks Alexandre 👍 |
Move first&last names in separate validation group
Thanks a lot Alexandre! :) |
First & last names can be null in the model, so we can't force them in the form.
Plus, it's super easy to make them compulsory if they are optional (just add the validation group). The other way is not straight forward at all given the validation system!