Skip to content

combine isEmail and allowEmpty #25

Description

@ir-fuel

It seems that I cannot use allowEmpty in the validate attribute.

What I would like to do is validate a field to be either a valid email address or empty. I don't seem to be able to do this? Am I correct or am I missing a simple way of doing this?

            <ValidatedInput
              id="profile-companyMail"
              name="companyMail"
              type="email"
              placeholder="Email"
              validate="isEmail"
              errorHelp="Incorrect Email"
            />

I would like to be able to put something like validate="allowEmpty,isEmail"

Thanks for helping me out!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions