Skip to content

Commit 208f907

Browse files
- Issue on pattern validation fixed.
1 parent f86984c commit 208f907

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/demo/index3.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313
<div class="">
1414
<div class="row">
1515
<label for="name" style="align-items: baseline">Name</label>
16-
<input type="text" required class="form-control" id="name" name="name" placeholder="Enter Name">
16+
<input type="text" required class="form-control" data-allowSpecial="_" data-allow="onlyAlpha" id="name"
17+
name="name" placeholder="Enter Name">
1718
</div>
1819

1920
<br><br><br><br><br><br><br>
2021

2122
<div class="row">
2223
<label for="name">Address1</label>
23-
<input type="text" required class="form-control" id="l_address" name="l_address"
24+
<input type="text" required class="form-control" pattern="[a-Z]" id="l_address" name="l_address"
2425
placeholder="Enter address1">
2526

2627
</div>

src/js/multi_formValidator.es6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ class jsFilter {
349349
// To check is this action is from "windows" action or not.
350350
if (true === helper.isWindowAction(event)) return true;
351351
// Managing the Pattern.
352-
let status = pattern.validate(event, 'a-zA-Z');
352+
let status = new pattern().validate(event, 'a-zA-Z');
353353
// Return status of the Action.
354354
if (false === status) event.preventDefault();
355355
};

src/js/multi_formValidator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ function jsFilter() {
329329
// To check is this action is from "windows" action or not.
330330
if (true === helper.isWindowAction(event)) return true;
331331
// Managing the Pattern.
332-
var status = pattern.validate(event, 'a-zA-Z');
332+
var status = new pattern().validate(event, 'a-zA-Z');
333333
// Return status of the Action.
334334
if (false === status) event.preventDefault();
335335
};

0 commit comments

Comments
 (0)