53 Commits

Author SHA1 Message Date
c009b06114 Fixes #14604: Fixed yii\validators\CompareValidator compareAttribute does not work if compareAttribute form ID has been changed 2017-11-15 00:43:14 +03:00
1501c659ac Add empty lines before return statements. (#14682) [skip ci] 2017-08-21 01:58:49 +03:00
a132ee9a08 Fixed order or checks in IpValidator
Fixes #13198
2016-12-13 18:14:04 +02:00
8ea1f510af Implemented Javascript test suite
fixes #12840

Used @nkovacs draft as starting
point(https://github.com/yiisoft/yii2/issues/11037#issuecomment-193356450).
I also fixed some bugs in `yii.validation.js` and did some refactoring.

Implemented tests:

- yii.validation.js

Running tests:

- Install Node.js. I used the latest version available at the moment -
  `v7.1.0`. Note that used `jsdom` dependent library version requires
`Node.js >= 4`.
- Run `npm install` to install dependencies.
- Execute `npm test` for running tests.
2016-12-01 11:25:18 +01:00
6f4c52a53d Simplified Regex usage in JS
Follows 70752b0fc1dde9a32d3565759d77072d3187f4eb
2016-11-05 21:07:05 +02:00
70752b0fc1 Fixes #11037: yii.js and yii.validation.js should use Regexp.test instead of String.match (#12839) 2016-10-26 10:44:08 +03:00
b9eb09b8b5 Set attribute $form as a scope for selector 2016-06-07 13:22:55 +03:00
7aef671872 Refactored FileHelper::validateMimeType, js validaton, PHPDocs 2016-02-24 00:40:34 +02:00
a4c68b5278 #5469 added mimetype mask validation feature 2016-02-24 00:40:34 +02:00
b804dbb98f IpValidator JS validation: wrongIp->message renamed 2016-02-08 19:44:44 +02:00
4c31c26628 EmailValidator - the name of the mailbox is no longer limited with the length 2016-02-01 23:49:51 +02:00
4a0d7b3676 Fixed client-side IP validator 2015-12-03 17:38:44 +02:00
bf6b50f58e #10142 Fixed EmailValidator to check email length properly 2015-11-14 00:39:12 +02:00
5242765257 Fixes #3506: Added \yii\validators\IpValidator to perform validation of IP addresses and subnets 2015-10-22 14:21:31 +03:00
fbce0c0450 Fixes #9591: Fixed yii.validation.js code so it is compressable by YUICompressor 2015-09-05 00:29:33 +03:00
f64d00bdf0 Fix client-side trim validator.
Subsequent validators now use the trimmed value instead of the original value.

fixes #7707
2015-05-13 14:18:27 +02:00
dad47b433e do not extra convert to floats in CompareValidator client code 2015-04-04 22:29:08 -04:00
57c298a523 Fixes #7361: The trim validator now works on the client side too 2015-02-22 19:25:06 -05:00
daddc61e7b Add File API detection to client file validator
Fixes #6345
2014-12-06 08:53:14 -05:00
72a81b8e31 Fixes #3581: Added yii\validators\CompareValidator::type to support type conversion before comparing values 2014-09-16 11:41:54 -04:00
3f9d590dbe minor fix [skip ci] 2014-08-03 08:30:30 -04:00
f0fefbb609 renamed function name [skip ci] 2014-08-02 22:38:55 -04:00
6dd2203a5c Fixes #4566: Added client validation support for image validator 2014-08-02 22:36:22 -04:00
87f58e4859 Abort further validation if there are no files to validate 2014-08-02 17:04:42 -04:00
8c5c4c503b Fix lines 2014-08-02 17:04:42 -04:00
ed3564c1cf Added client-side image validation 2014-08-02 17:04:42 -04:00
95460f92b2 Fixes #4360: Added client validation support for file validator 2014-07-23 22:56:04 -04:00
1a3a266fcd Changed Array.prototype.slice.call() into jQuery's $.each function for consistency 2014-07-23 22:41:35 -04:00
b3f0f7dceb Fixed typo and inconsistent conditionals 2014-07-23 22:41:35 -04:00
d1c2b137b3 Added client-side file validator 2014-07-23 22:41:35 -04:00
d3dd1352b9 RangeValidator typo fix 2014-05-23 20:06:56 +04:00
12a143bdac RangeValidator client side type conversion to array 2014-05-23 15:30:37 +04:00
a4e8829717 Additional RangeValidator fixes 2014-05-23 15:26:09 +04:00
b1ba2439a6 [WIP] Additional RangeValidator fixes 2014-05-23 01:56:51 +04:00
1182ba5e45 Fixes #3368 value also has to be parsed. 2014-05-06 17:44:34 +03:00
a2bf04b084 Fix for comparing numeric attributes in JavaScript 2014-05-06 11:15:58 +03:00
dd4464d670 Update yii.validation.js
Если длина строки не проходит валидацию, то выводим сообщение об этом, а не длину.))
2014-04-20 00:10:19 +03:00
7960ccdf50 Tab to spaces conversion. 2014-03-16 20:05:54 -04:00
da48b37856 Fixes #2756: Added support for injecting custom isEmpty check for all validators 2014-03-14 23:45:35 -04:00
0c38655217 psr-4 move 2014-01-10 21:41:43 -05:00
0d814fa523 Moved "framework" to "iii". 2013-05-09 12:00:15 -04:00
c7e40f5c7a Debug toolbar WIP. 2013-05-08 22:58:32 -04:00
aa8061b002 form wip 2013-05-03 00:03:16 -04:00
74f97ce5a9 refactored yii module. 2013-05-02 16:40:57 -04:00
66b123bce7 Minor JS code style issues 2013-05-03 00:09:42 +04:00
263e8c7f7e Finished CaptchaValidator. 2013-05-02 11:57:18 -04:00
08c3f90d48 Finished js validation for number validator. 2013-05-02 11:29:23 -04:00
4e7a33bcf5 Finished js validation for string validator. 2013-05-02 11:16:31 -04:00
5069c29b98 Finished js validation for URL validator. 2013-05-02 11:03:36 -04:00
4b30fe8b5a Finished js validation for email and regular expression validators. 2013-05-02 10:52:25 -04:00