52 Commits

Author SHA1 Message Date
a4b6b853b6 Fixed DateValidator to respect time when format is php:U
Fixes #15628
2018-02-18 09:55:43 +02:00
71c541773f PHPDoc fix 2018-01-23 13:17:25 +02:00
65f6b59b35 @inheritdoc notation changed 2018-01-23 13:11:24 +02:00
5a8c3d537b Enable phpdoc_summary rule in php-cs-fixer config (#14675)
* Enable `phpdoc_summary` rule in php-cs-fixer config.

* Fix case in "PHPDoc".
2017-08-21 11:19:35 +02:00
1501c659ac Add empty lines before return statements. (#14682) [skip ci] 2017-08-21 01:58:49 +03:00
fe8a0a6a2e Enable no_useless_else rule in php-cs-fixer (#14420) 2017-07-10 11:26:21 +03:00
ba0ab403b5 Added php-cs-fixer coding standards validation to Travis CI (#14100)
* php-cs-fixer: PSR2 rule.

* php-cs-fixer: PSR2 rule - fix views.

* Travis setup refactoring.

* Add php-cs-fixer to travis cs tests.

* Fix tests on hhvm-3.12

* improve travis config

* composer update

* revert composer update

* improve travis config

* Fix CS.

* Extract config to separate classes.

* Extract config to separate classes.

* Add file header.

* Force short array syntax.

* binary_operator_spaces fixer

* Fix broken tests

* cast_spaces fixer

* concat_space fixer

* dir_constant fixer

* ereg_to_preg fixer

* function_typehint_space fixer

* hash_to_slash_comment fixer

* is_null fixer

* linebreak_after_opening_tag fixer

* lowercase_cast fixer

* magic_constant_casing fixer

* modernize_types_casting fixer

* native_function_casing fixer

* new_with_braces fixer

* no_alias_functions fixer

* no_blank_lines_after_class_opening fixer

* no_blank_lines_after_phpdoc fixer

* no_empty_comment fixer

* no_empty_phpdoc fixer

* no_empty_statement fixer

* no_extra_consecutive_blank_lines fixer

* no_leading_import_slash fixer

* no_leading_namespace_whitespace fixer

* no_mixed_echo_print fixer

* no_multiline_whitespace_around_double_arrow fixer

* no_multiline_whitespace_before_semicolons fixer

* no_php4_constructor fixer

* no_short_bool_cast fixer

* no_singleline_whitespace_before_semicolons fixer

* no_spaces_around_offset fixer

* no_trailing_comma_in_list_call fixer

* no_trailing_comma_in_singleline_array fixer

* no_unneeded_control_parentheses fixer

* no_unused_imports fixer

* no_useless_return fixer

* no_whitespace_before_comma_in_array fixer

* no_whitespace_in_blank_line fixer

* not_operator_with_successor_space fixer

* object_operator_without_whitespace fixer

* ordered_imports fixer

* php_unit_construct fixer

* php_unit_dedicate_assert fixer

* php_unit_fqcn_annotation fixer

* phpdoc_indent fixer

* phpdoc_no_access fixer

* phpdoc_no_empty_return fixer

* phpdoc_no_package fixer

* phpdoc_no_useless_inheritdoc fixer

* Fix broken tests

* phpdoc_return_self_reference fixer

* phpdoc_single_line_var_spacing fixer

* phpdoc_single_line_var_spacing fixer

* phpdoc_to_comment fixer

* phpdoc_trim fixer

* phpdoc_var_without_name fixer

* psr4 fixer

* self_accessor fixer

* short_scalar_cast fixer

* single_blank_line_before_namespace fixer

* single_quote fixer

* standardize_not_equals fixer

* ternary_operator_spaces fixer

* trailing_comma_in_multiline_array fixer

* trim_array_spaces fixer

* protected_to_private fixer

* unary_operator_spaces fixer

* whitespace_after_comma_in_array fixer

* `parent::setRules()` -> `$this->setRules()`

* blank_line_after_opening_tag fixer

* Update finder config.

* Revert changes for YiiRequirementChecker.

* Fix array formatting.

* Add missing import.

* Fix CS for new code merged from master.

* Fix some indentation issues.
2017-06-12 12:25:45 +03:00
40e5702b6b Fixes #5108 DateValidator resets $timestampAttribute value on empty attribute (#14242)
* `yii\validators\DateValidator` now resets `$timestampAttribute` value on empty validated attribute value

* array-value test at `DateValidatorTest` restored
2017-06-05 11:50:02 +02:00
5bbf372f85 cleanup some phpdoc 2017-04-04 10:33:30 +02:00
Sam
06967f9018 Fixes #13254: Core validators no longer require Yii::$app to be set 2017-03-14 15:37:54 +03:00
4aa935e69e Fixes #12055: Changed boolean to bool and integer to int in phpdoc 2016-11-07 02:51:39 +03:00
64ed8c9112 added note about timezone conversion to DateValidator
fixes #11692
2016-10-13 13:06:50 +02:00
9b1b4fc5fa Added missing phpdoc 2016-07-30 00:02:51 +03:00
84e9c40ca1 updated datevalidator docs
issue #11692
2016-06-09 13:07:40 +02:00
00d506c398 completed implementation for #7177
added TYPE_TIME and default values for format to be chosen from
corresponding formatter variable

fixes #7177
close #10778
2016-04-26 21:56:40 +02:00
bb0ef88860 Enhancement for DateValidator (#7177, #10165)
Added parameter to define if checking for 'date' or 'dateTime'
and updated parseDateValueIntl($value, $format) to facilitate
this validation based on defined type.

Added unit tests to for validating dateTime values when using short format validation.

close #10778
2016-04-26 19:22:41 +02:00
2cf7e35074 Check for timestamp at yii\validators\DateValidator improved 2016-02-29 10:40:58 +02:00
779b1e90ce yii\validators\DateValidator skip validation for timestampAttribute, if it is already in correct format 2016-02-26 15:02:22 +02:00
cd84f6c4c5 typo in DateValidator docs 2015-08-27 16:36:59 +02:00
6ee285f321 unused imports removed 2015-07-09 22:20:11 +02:00
ae42a054bb PSR-2 spaces, commas, etc 2015-06-09 00:05:06 +03:00
3ec0d94b4a Remove unused variable 2015-06-08 05:04:07 +03:00
23b31d13de improve documentation of date validator
fixes #7514
2015-05-10 15:47:45 +02:00
3f24954659 Added min/max option to DateValidator.
Refs #7514
close #8115
2015-05-03 00:50:35 +02:00
cf51d46a75 keep BC in internal implamentation of DateValidator
prepare for #8115
2015-05-03 00:24:57 +02:00
1c41c2bd58 added DateValidator::$timestampAttributeTimeZone
this also makes DateValidator completly functional for validating values that include time.

issue #5053
2015-05-02 23:52:37 +02:00
d60445c066 Add DateValidator::$timestampAttributeFormat
includes refactoring of the formatting method to fix some major timezone issues.

fixes #5053
close #6820
2015-05-01 18:53:28 +02:00
ef662b57be added missing @since annotations 2015-04-24 12:09:40 +02:00
2a23520618 added documentation about handling date values
fixes #6530
fixes #5857
relates to #3973
2015-03-20 16:06:12 +01:00
ba6bce4e2d fixed DateValidator to work with multibyte strings
fixes #6835
2015-02-28 23:45:17 +01:00
8b5e16ed56 compare position at which date value parsing ended with its string length to ensure validation when using php intl extension to parse date value
- fixes #6553
- Add additional testValidateAttributeICUFormat() test case using "2012-12-12foo" for "yyyy-MM-dd" date format
- close #6835
2015-02-28 23:33:17 +01:00
58becaceab suppress warning thrown by IntlDateFormatter::parse()
Works around PHP Bug https://bugs.php.net/bug.php?id=68528

fixes #5962
2014-11-30 17:56:23 +01:00
d13d274d05 renamed $object to $model 2014-10-31 14:56:59 -04:00
02622b6fe4 phpdoc fixes and additions 2014-10-14 01:35:21 +04:00
3ff548a442 Refactored DateValidator to support ICU format 2014-09-16 22:53:12 +02:00
3a1e0f3a5c property codestyle framework 2014-07-30 00:21:31 +02:00
b5f8a4dc22 Reformat code te be PSR-2 compatible 2014-03-16 10:46:21 +06: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
ae6c69fc8f refacotring validators. 2013-04-05 08:32:13 -04:00
86f947e9ef Finished DateValidator. 2013-04-04 21:22:59 -04:00
4fdaab3560 updated file header. 2013-03-04 08:03:46 -05:00
3c1452e84b Changed the separator of message category. 2013-02-05 11:48:35 -05:00
54ee8c44a0 refactored exceptions.
I18N WIP.
2013-02-04 16:39:19 -05:00
8e05e6e62d changed copyright line. 2013-01-07 11:34:52 -05:00
083ca919d3 validators 2012-05-07 03:44:56 +04:00
a33d152d77 removed package and version tags 2011-12-09 18:13:36 +04:00
f8ea58826e cleaned up @since 2011-12-09 18:07:07 +04:00
0c7a75bef7 w 2011-07-22 17:09:47 -04:00
ef4ed7c803 w 2011-07-22 16:13:07 -04:00