v1.0.0
Changelogs
Added
- Rule
mimesto validate mime types from$_FILEdata. (https://github.com/rakit/validation/pull/69/commits/3924708356f106e4b78b17b7999d560f6e4904fd) - Method
Helper::jointo join array of string with given separator and last separator. (https://github.com/rakit/validation/pull/73/commits/8e99f34deb2b70a183b4c2372307dfc700dbc292) - Method
Helper::wrapsto wraps array of string with given prefix and suffix. (https://github.com/rakit/validation/pull/73/commits/8e99f34deb2b70a183b4c2372307dfc700dbc292) - Trait
Rakit\Validation\Traits\TranslationsTraitcontains setter and getter translations. (https://github.com/rakit/validation/pull/73/commits/bb8c375f6b1fba88cf21c6a34cf983ce0d4da645) - Method
Rule::setParameterTextto set custom parameter text that can be used in invalid message. (https://github.com/rakit/validation/pull/73/commits/550c6c4bbc242b10bd39116a6580c86931d12862) - Method
Rule::getParametersTextsto get custom parameters texts. (https://github.com/rakit/validation/pull/73/commits/550c6c4bbc242b10bd39116a6580c86931d12862) - PHP_Codesniffer. (https://github.com/rakit/validation/pull/66/commits/91ff9278da1f492f9e32f4f6ad41fe3dcf29e209)
- Typehints and PHPDoc comments. (#67)
Changed
- PHP minimum version from 5.5 to 7.0. (#62)
- Rule
uploaded_filecan be used to validate multiple file uploads. (#71) Rakit\Validation\ErrorBag::firstOfAll()return array assoc instead of indexed array. (https://github.com/rakit/validation/pull/64/commits/69b5110620d1538543f95621f882e6a8c600931a)Rakit\Validation\Rule::check()must returnbool. (#68)- Rules
min,max, andbetweencan be used to validate uploaded file size from$_FILES. (https://github.com/rakit/validation/pull/69/commits/ae3a47b2b1c3570f312dc63abbcebfa0a28cdfa3) - Rule
uploaded_filedefault message is dynamic depends on what caused. (https://github.com/rakit/validation/pull/73/commits/0db92799456d2ffcd8b387fe1b57a41dfee5b1e8) - Rule
inandnot_indefault messages shows what options are allowed or not allowed. (https://github.com/rakit/validation/pull/73/commits/0db92799456d2ffcd8b387fe1b57a41dfee5b1e8) - Rule
defaultusing traitRakit\Validation\Rules\Traits\ModifyValueto modify value if it's empty. (#71)