Commit Graph

76 Commits

Author SHA1 Message Date
Jörn Zaefferer
2ad0ca82da Core: Stop trimming value inside required method
There was never much of a point anyway, and it causes problems.

Fixes #1498
2015-06-16 19:50:11 +02:00
Jörn Zaefferer
60dd41053d Additionals: Drop bad test for notEqualTo method 2015-02-17 12:12:30 +01:00
Daniel DeGroff
c4b891e837 Additionals: Add notEqualTo method
New method ‘notEqualTo’ that delegates to the equalTo method and
returns the inverted value.

Closes #1020
2015-02-17 12:04:24 +01:00
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
Nadi
89034eb4d4 Additionals: Brazilian CPF number
Closes #1310
2014-11-11 22:33:42 +01:00
fernandopasse
cc6c4a4fd6 Additionals: Add postalcodeBR method
Validates brazialian postal codes

Closes #1291
2014-10-14 16:28:31 +02:00
Barry vd. Heuvel
4cecd73649 Additionals: Fix pattern method when parameter is a string
Reverts 37992c1c9e

The pattern should match the entire value of the input, not just a subset.

Closes #1204
2014-10-02 18:10:14 +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
e5f2d29f57 Build: Fix the jscs upgrade, disable some rules for now 2014-07-01 21:15:26 +02:00
Jeremy Forsythe
a128e26f04 Additionals: Add statesUS method
Validates two-letter US state abbreviations (including DC)

Closes #1005
2014-07-01 20:42:19 +02:00
Wing
a096aa2b76 Core: Improve dateISO RegExp
Closes #1136
2014-05-30 11:18:14 +02:00
Nick Schonning
d0c56e005e Build: Run JSCS against tests 2014-05-27 00:08:54 -04:00
pylover
b258647540 Additionals: Add persian date method
Also add localization for minWords and maxWords in persian.

Closes #1038
2014-05-20 16:13:41 +02:00
Nick Schonning
07779ae502 Additionals: Add postalCodeCA method
Checks for Canadian postal codes using the base regex from
http://geekswithblogs.net/MainaD/archive/2007/12/03/117321.aspx with
additional constraints from
http://www.canadapost.ca/tools/pg/manual/PGaddress-e.asp.

- First character must be a valid forward station character
- Must be all caps
- Must use space for forth character

Closes #1118
2014-05-20 16:05:32 +02:00
Markus Staab
104e8efceb Tests: Use asyncTest() method, replacing test() and stop() calls
Closes #1097
2014-04-29 17:56:41 +02:00
Jörn Zaefferer
e72a9b62df Test: Cleanup indent 2014-04-01 11:07:09 +02:00
Nick Schonning
3e09fcb719 JSHint: Apply onevar to tests 2014-01-23 18:14:23 -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
3d6f596485 JSHint: Replace braces with dot notation 2014-01-23 16:23:10 -05:00
Nick Schonning
91fa266cfe JSHint: Replace single for double quotes in tests 2014-01-23 16:16:53 -05:00
James Thompson
1a981b4403 Methods: Add additional method for currency
Closes gh-701
2014-01-14 19:22:06 +01:00
Jörn Zaefferer
279b932c12 Methods: Fix dateITA method, avoiding summertime errors
Using arbitrary hour or new Date() will use hour 00:00:00, which cause errors
on summertime changes.

Closes gh-773
2014-01-14 17:26:19 +01:00
Jamie R. Rytlewski
aa0d6241c3 Methods: Adding Smart Quotes to stripHTML's punctuation removal
Addresses an issue with the word count where smart quotes were not
removed, but the word count counted the words as the punctuation was not
removed.

Closes gh-811
2014-01-14 16:51:59 +01:00
Bart Sipes
bf3b350914 Core: Disable deprecated $.format
Throwing error if $.format is called and updated all deprecated calls to use
$.validator.format.

Fixes gh-755
Closes gh-971
2014-01-14 15:45:21 +01:00
Jörn Zaefferer
d865e4c5b8 Methods: Fix tests for email method. Follow-up to dd162ae 2014-01-14 15:30:20 +01:00
Jörn Zaefferer
dd162ae360 Methods: Update email to use HTML5 regex, remove email2 method
The regex provided by the HTML5 spec allows email addresses without a top level
domain, like name@localhost. That makes the email2 method pointless.

Hopefully this is the last time the email methods ever has to be updated. At
least it will make bug triage easier: If you don't like the implementation,
report an issue against the HTML5 spec.

Fixes gh-828
Closes gh-753
Closes gh-739
2014-01-14 15:27:29 +01:00
Pat Heard
d7a05b1c26 Add qunit tests for conditional validation rules
Updated tests for require_from_group and skip_or_fill_minimum rules.
The tests now check that other validation rules on the form are
enforced.
2013-12-02 10:25:07 -05:00
Alfonso Martín
317c20fa9b Added NIF, NIE and CIF Spanish documents numbers validation
* Added some translations to /localization
* Added test suite
Fixes gh-830
2013-08-22 01:06:08 -04:00
Nick Schonning
519bbc656b phoneUS: Add N11 exclusions. Closes gh-861
Numbers like 911 and 411 cannot be used for area or exchange codes.
https://en.wikipedia.org/wiki/NANPA#Numbering_system
2013-08-21 10:33:26 +02:00
Andrew Ray
f5f47c5c66 Restricting credit card validator to include length check. Closes gh-772
Without this, '41111' is considered a valid credit card number.
2013-06-25 11:39:47 +02:00
g1smd
d447b41b83 Update phonesUK and mobileUK to accept new prefixes. Closes gh-750 2013-05-22 12:53:42 +02:00
Jörn Zaefferer
b51e86f558 Add extra unit test for zipcodeUS method, based on GH comment 2013-05-20 15:53:31 +02:00
rstaib
ed51405d84 Add validation method for BIC. Closes gh-743 2013-05-14 18:11:41 +02:00
Strand McCutchen
165005d4b5 Verify nine-digit zip codes. Closes gh-726 2013-05-12 15:17:16 +02:00
Veres Lajos
f79e647f9f typo fixes 2013-05-08 14:35:26 +01:00
James Thompson
bbbf87903d Improved the UK postcode method to filter out more invalid postcodes. Closes #682
Old one allows integers between 5-7 digits which is not valid.

New one is still case insensitive and allows spaces & fixes the above issue.
2013-03-20 12:19:20 +01:00
jzaefferer
4a51e71c6f Fix typos 2013-03-07 13:55:35 +01:00
Robbert Wethmar
509e6e3619 Add additional, dutch-specific methods: phone, mobile, postal, bank and giro account
add dutch phone number validation
2013-02-27 15:43:06 +01:00
Robbert Wethmar
581ccd80ec Added iban validation. Closes gh-630 2013-02-27 14:27:22 +01:00
Jörn Zaefferer
58dece930a Add tests for phoneUK method 2013-02-27 14:07:05 +01:00
g1smd
45154af738 Updated and corrected GB RegEx pattern. Minor refactor of RegEx pattern. Minor RegEx refactor for efficiency. Fix holes in date validations. Closes gh-514 2013-02-27 13:55:20 +01:00
Jörn Zaefferer
b5cd04e327 Lint test files 2013-01-31 00:28:13 +01:00
Synchro
e4f3a87493 Fix some date validations, JS syntax errors. 2012-11-26 11:48:24 +01:00
g1smd
0b3e34cde9 Optimise RegEx patterns, especially for UK phone numbers. 2012-09-06 16:25:53 +02:00
Max Lynch
55920f0f75 Updated UK Mobile phone number regex for new numbers. Fixes #154 2012-05-07 15:14:00 +02:00
Max Lynch
851e941a60 Fixed regex for time additional method. Fixes #131 2012-05-05 14:19:47 -05:00
Max Lynch
f0b8042233 resetForm now clears old previousValue on form elements. Fixes #312 2012-05-04 10:48:49 -05:00
Max Lynch
c3ce5b4569 Added checkbox test to require_from_group and changed require_from_group to use elementValue. Fixes #359 2012-05-04 11:20:17 +02:00
Max Lynch
a24e58a293 Fixed dataFilter response issues in jQuery 1.5.2+. Fixes #405 2012-05-04 11:13:06 +02:00
Max Lynch
278d3f3b3e Added US zip code support and test. Fixes #90 2012-04-29 20:34:18 +02:00