Skip to content

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

@Lumeriol

Description

@Lumeriol

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions