Commit Graph

283 Commits

Author SHA1 Message Date
Markus Staab
45c4b17f45 Core: Added failing test for #1805. Patch by @Arkni. 2016-07-22 16:16:56 +02:00
Brahim Arkni
74b38e9db5 Core: Fix regressions introduced in #1644 and #1657. Closes #1800.
As of now the signature of `validator.defaultMessage( element, string )`
is deprecated. Use `validator.defaultMessage( element, object )` instead
where objet is defined as
```
object = {
   method: "method name",
   parameters: "the given method parameters"
}
```
2016-07-15 16:22:17 +02:00
Torgny Bjers
cb6068110c Tests: Added regression unit tests for PR #1760
Testing small fraction steps to ensure correct modulo operation.
Cleaned up @adhayward's formatting, was using spaces instead of tabs.
2016-07-15 16:10:00 +02:00
Jordan Clark
38310a142e Core: Fix error when calling $.fn.rules() on a non-form element.
Closes #1771. Fixes #1770.
2016-06-14 17:39:40 +02:00
Brahim Arkni
b9d5d80f3f Additional: Fix multiple mime-type validation
Fixes #1775. Closes #1779.
2016-06-14 17:32:26 +02:00
Michael Hohlovich
7b8a0face3 Additional: IBAN require at least 5 chars. Closes #1797. Fixes #1674. 2016-06-14 17:29:09 +02:00
Brahim Arkni
b106d39c16 Core: Call errorPlacement in validator scope
Fixes #1542. Closes #1780.
2016-06-14 17:13:55 +02:00
svrx
73c173198c Core: Fixed issue with contenteditable elements in forms where events for single input validation would cause exceptions.
Fixes #1729. Closes #1785.
2016-05-28 12:41:33 +02:00
Brahim Arkni
f07a267d1e Core: resetForm should also remove valid class from elements
Closes #1708
2016-02-24 17:42:40 +01:00
Lars Skjelbek
e9fd71d89b Core: Unhighlighting field if already highlighted when using remote rule.
Closes #1712. Refs #1669, #1375, #12.
2016-02-19 15:52:34 +01:00
Markus Staab
5fc3585c2a Merge branch 'pr/1709' 2016-02-13 10:47:13 +01:00
Brahim Arkni
ef223608a3 Core: Bind the blur event just once in equalTo rule
bind the event just once, avoiding the unbind-rebind overhead.
Also, unbind it when destroying the plugin.

Ref #1704
Ref #1707
2016-02-12 16:50:34 +00:00
Markus Staab
bb87ef02d5 Tests: Calling .rules() on an empty jQuery object results in an error.
Refs #1706
2016-02-12 16:13:55 +01:00
Brahim Arkni
add2489354 Core: Fix TypeError in showLabel when using groups settings
The `this` inside `$.each()` refers to the current value of the
`Objcet|Array` we iterate over, not the plugin instance.

Ref jzaefferer/jquery-validation/pull/1614#discussion_r51156526

Closes #1700.
2016-02-02 09:59:24 +01:00
Wojciech Wałek
4101b898c0 Core: Adding a way to pass method name to remote
Closes #1657.

This allows reusing remote as custom method via addMethod
2016-02-01 09:12:47 +01:00
Štefan Baebler
9ab4b8c32f Additional: BIC: allow digits 1-9 in second place of location
It seems that the BIC specification https://en.wikipedia.org/wiki/ISO_9362
was interpreted too strictly, only allowing digits 1 and 2 while those 2 just
have a special meaning, but all 1-9 are allowed.

Example: SSKNDE77XXX Sparkasse Nuernberg. Closes #1658.
2016-01-28 18:20:01 +01:00
Brahim Arkni
7d74fc4157 Core: Validation fails to trigger when next field is already filled out
This change fix the bug when used with remote rule, it's already fixed
with other rules in commit 737630e788

Ref #1508
2016-01-18 15:25:23 +00:00
Brahim Arkni
40dae365ed Core: Required rule take precedence over number & digits rules
Ref #1611
Ref #1663
Fixes #1514
2016-01-11 09:28:06 +01:00
Brahim Arkni
ef6821aba3 Core: Error hidden but input error class not removed
When a field has one rule with option `depends` specified and this
dependency mismatch, the plugin will remove it, so that field will not be
validated on submit by the the rule in question. So if that field is
already invalid, only the error message will be hidden and the error class
will remain.

This commit fixes this issue.

Fixes #1632
2016-01-07 18:12:51 +01:00
Markus Staab
9d00c2b9ff Tests: added coverage for #697 (Arkni). 2016-01-07 17:41:53 +01:00
Lukasz Wozniak
4ebe40d1b2 Core: Fixed field highlighting with remote validation.
Prevent remote validation from removing highlight from other invalid fields.
Closes #1584.
2016-01-07 17:29:42 +01:00
KJ
bd45147a0e Core: Fixed :filled selector for multiple select elements. closes #1661, #1662. 2015-12-10 10:57:47 +01:00
Michal Moravec
9962f627c0 Additionals: Accept method regex should be escaped properly.
This adds support for types like "application/epub+zip"
which contain regex meta characters.

Fixes #1243, #1258. Closes #1531, #1373. Refs #1512.
2015-11-26 08:58:12 +01:00
Brahim Arkni
a3cc0c0a70 Core: move message processing from formatAndAdd to defaultMessage
Fixes #741. Closes #1644.
2015-11-24 09:16:18 +01:00
Brahim Arkni
43ffa81180 Core: errorList should contain only the errors that it should
When using the `valid` method on a list of inputs and there is an ignored
input in that list, the errorList is not cleared causing it to slowly
growing larger and larger when calling `valid` several times.

Fixes #1618
2015-11-24 09:13:18 +01:00
Brahim Arkni
a336e14755 Core: Extract the file name without including "C:\fakepath\"
For historical reasons, the value IDL attribute prefixes the file name
with the string "C:\fakepath\". As a result of this,
this fix will extract the file name from the value IDL attribute in a
backwards-compatible way.

For more details, see:
 - http://www.w3.org/TR/html5/forms.html#dom-input-value-filename
 - http://www.w3.org/TR/html5/forms.html#fakepath-srsly

Fixes #1615
2015-11-19 21:45:42 +00:00
unknown
792dad3539 Tests: new test for Step exception logic added 2015-11-12 10:15:20 +01:00
Filip Mares
b3c07e3957 Core: HTML5 step attribute support. Fixes #1295 2015-11-12 10:14:36 +01:00
Brahim Arkni
3f3fb8c2ed Test: extend BIC unit test to support lowercased BIC values 2015-11-09 09:24:31 +01:00
Brahim Arkni
729823a807 All: Fixed code style issues 2015-10-30 23:55:26 +00:00
Brahim Arkni
7143d5197e Tests: uncomment require_from_group & skip_or_fill_minimum tests 2015-10-30 15:07:38 +00:00
Markus Staab
5d778ee443 Merge pull request #1418 from dorner/content-editable
Add support for contentEditable tags
2015-10-30 00:05:10 +01:00
Saldanha
c52da5ba98 Test: Added test for "pending" remote status 2015-10-29 17:20:53 -04:00
Daniel Orner
9f5b654cb3 Core: Another whitespace fix 2015-10-28 16:57:48 -04:00
Daniel Orner
b0ac381564 Core: Fix more whitespace 2015-10-28 13:40:50 -04:00
Daniel Orner
4c2f5fdf49 Core: Fix whitespace 2015-10-28 13:40:50 -04:00
Daniel Orner
32dea705b3 Core: Fix grunt errors 2015-10-28 13:40:49 -04:00
Daniel Orner
b76c83e742 Core: Fix lint errors, add test 2015-10-28 13:40:49 -04:00
Markus Staab
a6151f9064 Merge pull request #1609 from Arkni/transformation-layer
Core: Added transformation/normalization layer
2015-10-25 20:49:35 +01:00
Brahim Arkni
abe6810444 Core: Added normalizer
The user can change the value of an element before validating
the element in question. The new value will be then used by
the associated methods instead of the `real one`.

Closes #1602
2015-10-23 20:58:36 +01:00
Brahim Arkni
f0144b56b9 Core: Split out creditcard method
As mentioned by Jörn in #1506
2015-10-21 22:48:06 +01:00
Brahim Arkni
8327818438 Core: Escape errorID for use in the regex, not to build aria-describedby
The error ID was being escaped for use in a regex, but these escaped
characters were also being passed on to the aria-describedby value
set in the HTML, which means the ID doesn't match up with the ID of
the element it's referring to.

Fixes #1523
Closes #1587
2015-10-19 16:52:16 +01:00
Brahim Arkni
9b498e0113 Test: Added unit test that runs into the issue reported in #1523 2015-10-17 14:28:29 +01:00
Brahim Arkni
d845a33c6e Test: Added unit test runs into the error reported in #1603 2015-10-09 15:46:05 +01:00
Brahim Arkni
842e7ff5dd Test: Fix misuse of equal method & some spacing issues. 2015-09-25 16:54:38 +01:00
Markus Staab
4df6cb8b56 Merge pull request #1579 from Arkni/fix-1508
Fixes #1508: Validation fails to trigger when next field is already filled out
2015-09-25 15:06:07 +02:00
Brahim Arkni
cd4385572b Test: Fixed wrong order of parameters of the equal method 2015-09-23 22:49:00 +01:00
Brahim Arkni
737630e788 Core: Validation fails to trigger when next field is already filled out
Closes #494
Fixes #1508
2015-09-16 15:48:42 +01:00
Christopher Bauer
5679ad7bba Core: method.js fix tests for #1567
Incorrect tests were rebased.
2015-09-11 11:53:18 -04:00
Christopher Bauer
17a56baa6f Core: core.js, methods.js, Fix for #1567 - jquery-validation ignores data obj when validating, incorrectly returning previous status
This change determines if either the validated element's value OR one of the data properties has changed before aborting the remote request. If your remote validation is skipped due to being dependent on the value of another field, this fixes that issue.
2015-09-11 09:07:43 -04:00