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

Always use data-pristine-attribute if the 2 variants of the attribute exists #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

soleneggd
Copy link

The issue is explained here #96.

@1ucay
Copy link

1ucay commented May 25, 2024

for me not working...my code, where pattern order doesn't matter. tag pattern is fallback, where JS can be disabled.

<input type="text" name="first-name" required autocomplete="given-name" pattern="[\p{sc=Latin}\p{M}\s\-,.']+" data-validate-pattern="/^[\p{L}\p{M}\s,.'-]*$/gu">

self.fields = Array.from(form.querySelectorAll(SELECTOR)).map(function (input) {
  var fns = [];
  var params = {};
  var messages = {};

  [].forEach.call(input.attributes, function (attr) {

    var nameClean = attr.name.replace( 'data-validate-', '' );
    if ( attr.name === nameClean && input.attributes.getNamedItem("data-validate-" + nameClean )) return;

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

Successfully merging this pull request may close these issues.

2 participants