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

Core: Add multiple attribute to email method. #2074

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RobJohnston
Copy link
Contributor

Using @Sven-Mad's method. Fixes #1722.

@stale
Copy link

stale bot commented Jun 5, 2018

This issue/proposal has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and one of the maintainers will (try!) to follow up.
Thank you for contributing :)

@stale stale bot added the stale Used to mark stale issues label Jun 5, 2018
@RobJohnston
Copy link
Contributor Author

I think this PR still has merit.

@stale stale bot removed the stale Used to mark stale issues label Jun 5, 2018
@Arkni
Copy link
Member

Arkni commented Jun 16, 2018

Hi @RobJohnston,

Sorry for taking so long to review this PR. I only have one concern about this implementation. That no_multiple argument will always be true whether you are setting the rule using inline HTML or in JS.

What I would like to suggest is, we add support for passing an object to email method in JS like the following:

$("form").validate({
  rules: {
    field: {
      email: true | false | {
        multiple: true | false
      }
    }
  }
});

The no_multiple parameter will need to be changed to param (or another convenient name).

@Arkni Arkni mentioned this pull request Jul 20, 2018
@RobJohnston
Copy link
Contributor Author

RobJohnston commented Feb 29, 2020

Hi @Arkni . It's now my time to apologize to you for the delay! I've been away from front-end development for some time. I didn't quite understand your comment when I first read it and not sure if I do now.

From the W3, the multiple attribute is what they call a boolean attribute, but that doesn't mean that it can be set to "true" or "false". It must be multiple="multiple" or simply just multiple. To represent a false value, the attribute has to be omitted altogether. Does that change your suggestion where you wrote:

multiple: true | false

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

Successfully merging this pull request may close these issues.

email input type and the multiple attribute
3 participants