Skip to content
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

Method addEmail: unable to have own rule message for EMAIL #251

Open
Lumeriol opened this issue Jun 18, 2020 · 0 comments
Open

Method addEmail: unable to have own rule message for EMAIL #251

Lumeriol opened this issue Jun 18, 2020 · 0 comments
Milestone

Comments

@Lumeriol
Copy link

Version: 3.0.4+ and probably older

Bug Description

If I define in form $form->addEmail('email', 'E-mail'), there is no option to show errorMessage from method addRule(Form::EMAIL, 'E-mail nemá správný tvar.'), because this rule is set in method and it is not overwritten.
Same problem should be for addInteger(), but I don't tested it.
For this purposes I must to use addText with rule for e-mails.

Expected Behavior

As I wrote up, have an own error message in rule Email.

Possible Solution

Maybe to have a parameter for errorMessage in addEmail() or remove addRule(Form::EMAIL) from this method.

@dg dg modified the milestone: v3.1 Jan 18, 2021
@dg dg added this to the v4.0 milestone Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants