Aura.Filter Versions Save

Validate and sanitize arrays and objects.

2.3.1

7 years ago
  • (DOC) Update the documentation 128, 129
  • (FIX) PHP Notice when trying to sanitize a string to integer 132
  • (ADD) 'phpunit/phpunit' as require-dev dependency in composer.json .
  • (ADD) Added CHANGELOG.md file.
  • (REMOVE) Removed CHANGES.md file.

2.3.0

7 years ago
  • (ADD) Implement JsonSerializable in the Failure class
  • (DOC) Update the documentation
  • (FIX) Removed undefined but registered sanitizers from SanitizerLocator

2.2.0

8 years ago

This release adds new validation and sanitizing rules:

  • lowerCase for all-lower-case values
  • upperCase for all-upper-case values
  • titleCase for title-cased values
  • lowerCaseFirst for values where the first character is lower-case
  • upperCaseFirst for values where the first character is upper-case

2.1.0

8 years ago

This release adds an isNotBlank() validation specifier, and fixes a bug where sanitizing to() a rule on a missing field raised a notice.

2.0.0

8 years ago

First stable release.

  • (FIX) The Spec class now reports failures better when closures are used in HHVM.
  • (TST) Improved testing.

2.0.0-beta3

8 years ago

Third beta release.

  • (BRK) Due to new blank-checking in ValidateSpec::applyRule(), remove 'blank' validation rule, and add 'isBlank()' validation spec method.
  • (FIX) Filter arguments using arrays, resources, and objects (including closures) no longer cause errors when creating the default filter message.
  • (ADD) Validation now fails on missing (unset or null) fields.
  • (DOC) Update documentation.

2.0.0-beta2

8 years ago

Second beta release.

  • (ADD) Add UTF-8 support in Alpha, Alnum, Strlen*, and Word filters with help from @mivanov93.
    • All string-length filters are now multi-byte aware using either mbstring or iconv extensions.
    • In alnum and alpha rules, use unicode letters and digits instead of ctype.
    • In word rules, use unicode letters and digits instead of \w and \W.
  • (ADD) More robust email validation based on is_email() from @dominicsayers, plus IDN support as suggested by @dg via the intl extension.
  • (TEST) Update Travis-CI config to use containers.
  • (DOCS) Update relevant documentation.

2.0.0-beta1

8 years ago

First 2.0 beta release.

  • BREAK: Renamed class Filter to SubjectFilter.
  • BREAK: Removed method SubjectFilter::strict() and all "strict" behavior, as get_object_vars() is not guaranteed in some objects (e.g. magic get/set vs public properties)
  • BREAK: Replaced method SubjectFilter::getMessages() et al with getFailures(); failures are now reported as a FailureCollection instead of as an array of text messages.
  • BREAK: Removed classes Rule\Validate\Ipv4 and Ipv6 in favor of allowing flags on Rule\Validate\Ip.
  • BREAK: Removed class Rule\Validate\InTableColumn entirely, as it requires a PDO connection. This is better implemented as part of a group of database-related filters, rather than as a special case herein.
  • BREAK: Moved namespace Rule\Locator to Locator.
  • BREAK: Renamed class Spec\AbstractSpec to Spec\Spec.
  • BREAK: Removed method Spec\Spec::getFailureMode().
  • BREAK: Moved constants from SubjectFilter to Spec\Spec.
  • BREAK: Removed methods ValueFilter::assert() and setExceptionClass().
  • ADD: Class FilterFactory now takes two constructor params, $validate_factories and $sanitize_factories, to allow injection of rule factories at construction time.
  • ADD: Class AbstractStaticFilter to allow users to create static value filters.

2.0.0-alpha1

8 years ago

First 2.0 dev release; breaking changes are coming.