Commit Graph

114 Commits

Author SHA1 Message Date
wozzo
02b800d9af Core: Fixed number validation error
A single minus sign is invalid.

Fixes #1359
Closes #1361
2015-01-20 16:46:57 +01:00
Jörn Zaefferer
7e9495c31e Core: Fix reference to whatwg spec
Ref #1372
2015-01-11 20:48:19 +01:00
Maks3w
a6c2a81d7f Core: Focus invalid element when validating a custom set of inputs
Invalid element is not focused when validate a custom set of inputs and
the last one is a valid input. The issue is element method, via
prepareElement method, via reset method, resets errorList state after
validate each input so the global state of the validator is not
preserved.

Closes #1327
2014-12-16 16:03:49 +01:00
Maks
535033dbd4 Core: Reset element styles when using custom highlight methods
When use a custom highlight functions which for example place the error
class in a different element (like Bootstrap form-group wrapper) this
element are not unhighlighted after resetForm.

Closes #1323
2014-12-02 17:38:58 +01:00
a-barry
394a246d4a Core: Escape dollar sign in error id
Fix non label error elements containing $ character in the name/id
(asp.net web forms) causing syntax error in sizzlejs.

Fixes #1331
Closes #1336
2014-12-02 16:37:38 +01:00
Igor
f39022c835 Core: Update link in comment for Luhn algorithm
Closes #1329
2014-11-20 13:40:13 +01:00
Jörn Zaefferer
fe14d00a1d Core: Allow 0 as value for autoCreateRanges
Closes #1293
2014-10-14 16:25:06 +02:00
colemanw
9f4ba10ea7 Core: Ignore readonly as well as disabled fields.
Closes #1261
Closes #1262
2014-09-23 13:50:32 +02:00
Jörn Zaefferer
d36d1bcb45 Core: Improve id escaping, store escaped id in describedby
Ref #1275
Fixes #1269
Closes #1273
2014-09-23 13:40:39 +02:00
Jörn Zaefferer
452b823c86 Core: Don't trim value in min/max/rangelength methods
Fixes #1274
2014-09-23 13:33:14 +02:00
Jörn Zaefferer
20f3e9fac9 Core: Escape id/name before using it as a selector in errorsFor
Fixes #1275
2014-09-23 13:27:51 +02:00
Jörn Zaefferer
f1c611ed7a Core: Apply ignore setting to all validationTargetFor elements
Previously the filter only applied to checkables. Adds a test and moves
an existing valid() test closer to the others.

Ref #156
Closes #468
2014-09-23 12:23:37 +02:00
Jörn Zaefferer
8b2f1e09b8 Core: Use return value of submitHandler to allow or prevent form submit
Gives more control to the user over allowing or preventing the native
submit event, instead of always preventing it.

Fixes #650
2014-09-23 11:59:05 +02:00
Jörn Zaefferer
0cb3c957c1 Core: Explicit default for focusCleanup option
Also removes unused blockFocusCleanup property check.

Fixes #676
2014-09-23 11:53:18 +02:00
Damian Mooyman
c054707d6f Core: Fix incorrect regexp
Fixes #1200
Closes #1201
2014-08-11 17:08:41 +02:00
Jörn Zaefferer
e5f2d29f57 Build: Fix the jscs upgrade, disable some rules for now 2014-07-01 21:15:26 +02:00
Damian Mooyman
ea22f54348 Core: Respect non-error aria-describedby and empty hidden errors
Ref #1083
Closes #1140
2014-06-23 11:17:35 +02:00
Wing
a096aa2b76 Core: Improve dateISO RegExp
Closes #1136
2014-05-30 11:18:14 +02:00
Nick Schonning
56a2a18368 Build: Bump and merge JSHint/JSCS config
Moved options depreciated in the latest JSHint to the JSCS version.
2014-05-26 23:13:18 -04:00
Lars Laade
cda5efa487 Core: Added radio/checkbox to delegate click-event
Reverts the accidental change from d319a0da35,
where these event handlers were dropped.

Closes #1126
2014-05-23 14:17:35 +02:00
Lars Laade
db55d36de5 ALL: Add plugin UMD wrapper, Closes #977 2014-05-21 13:31:48 +02:00
Damian Mooyman
e5e70b1632 Core: Use aria-describedby for non-label elements
Fixes #900
Closes #1083
2014-05-21 11:39:51 +02:00
Markus Staab
d319a0da35 Core: Register focusin, focusout and keyup also on radio/checkbox
Fixes #1062
Closes #1065
2014-05-20 15:54:26 +02:00
Markus Staab
fdafdd7dfb Core: prevent unnecessary $() rewrapping, re-use local var instead 2014-05-02 20:29:48 +02:00
Jörn Zaefferer
a0ed6f8111 Core: Fix normalization for rangelength attribute value
This regressed at some point, probably when rules-as-data-attributes where
introduced, since those are automatically parsed as JSON. For the unprocessed
attributes, the array brackets have to be removed.

Also fixes the milk demo, which specified rangelength as the message, instead of
minlength, which it actually uses.

Fixes #1087
2014-04-29 20:41:18 +02:00
Jamie R. Rytlewski
d09a5ee199 Core: Update elementValue method to deal with type="number" fields
The HTML5 draft defines, for type="number" inputs: "The value
sanitization algorithm is as follows: If the value of the element is not
a valid floating-point number, then set it to the empty string instead."
If the constraint validation considers the input invalid, return false
as the value, instead of the empty string, for the number and digit
methods to output their messages.

This would break in browsers that support type="number", but not the
constraint validation API. I don't know of any existing browser where
that applies.

Fixes #858
Fixes #922
Closes #1093
2014-04-29 20:23:43 +02:00
Markus Staab
6eb3a576ed Core: Use element.name and element.type consistently
Instead of using the jquery provided method, we use the native ones
instead. we already rely on them in other places, therefore we don't get
anything from using them here.

Closes #1096
2014-04-29 17:48:57 +02:00
NetImperia
69e1c5f1d3 Core: Use charAt instead of array notation on strings, to support IE8(?)
Closes #1067
2014-04-08 12:47:56 +02:00
Jörn Zaefferer
f5a995c210 Build: Generate headers in concat task, remove from src 2014-03-31 22:14:14 +02:00
YuraDubensky
89a15c7a4b Core: Add "method" field to error list entry
To check what kind of validation rule was broken, so we could find a
difference between required or regex validation error raised.

Closes #1035
2014-03-31 19:29:14 +02:00
Markus Staab
6c041edd21 Core: Improve elementValue method
Do not rewrap several times. Call .val() only when required.

Closes #1055
2014-03-31 18:21:21 +02:00
Markus Staab
03cd4c9306 Core: Use plain element instead of un-wrapping the element again
Closes #1060
2014-03-31 18:14:52 +02:00
Jörn Zaefferer
aa2f21afc2 Build: Fix minified header, use actual new lines.
Also fix homepage URL in source

Fixes #1053
2014-03-31 17:57:00 +02:00
Nic Jansma
9dc0d1dd94 Core: Allow attributes to have a value of zero (eg min='0')
Closes #1029
Closes #930
Fixes #854
2014-03-12 11:34:02 +01:00
Nick Schonning
e7aed00f20 JSHint: Apply onvar to src files 2014-01-24 13:44:43 -05:00
Nick Schonning
313fd1dd3f JSHint: Remove unused parameters
- Fix double quoting in mockjax response to use doublequotes again
2014-01-23 17:45:37 -05:00
Nick Schonning
c60f6d52f7 JSHint: Replace single for double quotes in src 2014-01-23 16:16:32 -05:00
Nick Schonning
ca0253df5d JSCS: Combine multiple var statements
IBAN also fixed spacing and repaced gh-980 since it had bad spacing and
was trimming twice
2014-01-16 13:21:02 -05:00
Nick Schonning
039f4ab220 JSCS: Move else to same line as curly 2014-01-16 13:21:01 -05:00
Nick Schonning
ecb7dae759 JSCS: Spaces after keywords 2014-01-16 13:21:01 -05:00
Nick Schonning
a5af5b3e4e JSCS: Spaces inside curly braces 2014-01-16 13:21:01 -05:00
Nick Schonning
20f0dd3e32 JSCS: Removel multiple blank lines 2014-01-16 13:21:00 -05:00
Nick Schonning
9234f8e220 JSCS: Spacing inside arrays 2014-01-16 11:55:09 -05:00
Nick Schonning
29dbc78884 JSCS: Stick colons to object property names
The `{url: param}"` seems like an odd comparitor
2014-01-16 11:55:09 -05:00
ruado1987
a86421131e Core: Ignore events on ignored elements
When an ignored element produces a blur event, it causes the valid() method to
return the wrong value.

Fixes gh-700
Closes gh-705
2014-01-14 17:54:51 +01:00
Jörn Zaefferer
f7a259254c Core: Whitespace cleanup 2014-01-14 17:47:12 +01:00
joseph.bott
3f464a8da4 Core: Make element() handle ignored elements properly.
Allows ignored elements to be validated, removing any errors if necessary.

Closes gh-721
2014-01-14 17:45:56 +01:00
Martin Laine
5bebaa5c55 Core: Added support for generic messages via data-msg attribute
Closes gh-747
2014-01-14 17:34:38 +01:00
Jörn Zaefferer
8c92533394 Core: Fix whitespace in updated methods 2014-01-14 17:21:06 +01:00
John Reilly
460fd22b6c Core: Switch dataRules parsing to W3C HTML5 spec style
Closes gh-778
2014-01-14 17:17:58 +01:00