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

switch to data-valid-required and data-valid-pattern="" #6

Closed
jgallen23 opened this issue Sep 30, 2013 · 16 comments
Closed

switch to data-valid-required and data-valid-pattern="" #6

jgallen23 opened this issue Sep 30, 2013 · 16 comments
Assignees

Comments

@jgallen23
Copy link
Member

might be nicer to namespace the data attributes to avoid collision.

@ghost
Copy link

ghost commented Sep 30, 2013

What dies value do? Is it a replacement for something or additional attribute.

@jgallen23
Copy link
Member Author

data-valid="pattern" data-valid-value="\d" instead of data-pattern="\d"

@ghost
Copy link

ghost commented Sep 30, 2013

So data-valid="required"?

@jgallen23
Copy link
Member Author

yes, thoughts?

@ghost
Copy link

ghost commented Sep 30, 2013

How do you handle something that is valid and pattern?

@jgallen23
Copy link
Member Author

See above

@ghost
Copy link

ghost commented Sep 30, 2013

Not following. Data-valid=required data-valid=pattern data-valid-value=\d?

@jgallen23
Copy link
Member Author

well, as of right now, pattern implies required since \d will not pass if it's blank

@jgallen23
Copy link
Member Author

if we want to change that, we could to data-valid="required,pattern" or do data-valid-required or data-valid-pattern

@ghost
Copy link

ghost commented Sep 30, 2013

Will that work in all fields or just input?

@jgallen23
Copy link
Member Author

what other fields does pattern work on?

@ghost
Copy link

ghost commented Sep 30, 2013

I guess what im getting at is that required could be placed on a check box and then the regex won't work. And just because something has a regex doesn't mean it's required.

@jgallen23
Copy link
Member Author

I'm not following. regex obviously won't work on a check box.

@ghost
Copy link

ghost commented Sep 30, 2013

Did you intend for this library to be used on anything other than input boxes?

@jgallen23
Copy link
Member Author

yep, should work with all form elements. Do you see an issue with that?

@jgallen23
Copy link
Member Author

going to just namespace. data-valid-required, data-valid-pattern="\d"

@ghost ghost assigned jgallen23 Oct 1, 2013
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

1 participant