Skip to content

Releases: xtreamwayz/html-form-validator

html-form-validator 1.0.1

12 Jun 19:05
1.0.1
2910202
Compare
Choose a tag to compare

Added

  • Nothing.

Changed

  • Nothing.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • #74 fixes setting non string values on a DOMElement attribute.

html-form-validator 1.0.0

19 Mar 08:13
1.0.0
90cea97
Compare
Choose a tag to compare

Added

  • #68 adds the option to inject a preconfigured inputfilter. Sometimes you want to have an inputfilter and re-use it in several places.

    The injected inputfilter will be used as a base and missing filters and validators will be added from the form if the base inputfilter doesn't have a filter with the same name.

Changed

  • #65 changes the css classes to something more meaningful and generic. The parent class that contains the failing input now gets a has-validation-error css class. The div containing the error message can be styled with the validation-error css class. The failing input element already got the aria-invalid="true" attribute.

  • #68 drops PHP 5.6 support and requires PHP 7.1+.

  • #69 changes the FormFactory::fromHtml() method to non-static. This is done so an optional Zend\InputFilter\Factory can be injected and shared.

    If you don't need this, you can use the FormFactory like this: $form = (new FormFactory())->fromHtml($html, []).

  • #69 changes the instance the FormFactory::fromHtml() returns. It now returns a FormInterface, which has basically the same interface as the previous returned FormFactoryInterface. Only the form related logic has moved from the FormFactory into a Form class.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • Nothing.

0.9.0

22 Jul 07:38
Compare
Choose a tag to compare
0.9.0 Pre-release
Pre-release

Added

  • #59 checks if a request method is set and if it's a post
    when calling validate(). If it wasn't a post, it skips validation.
    If the method isn't set, it always runs the validation.
  • 8035d4e removes PHP 7 strict types and adds
    support for PHP 5.6. Version 1.0.0 will target PHP 5.6+ and version 2.0.0 will target PHP 7

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • #58 fixes the zend-servicemanager dependency.
    It's now installed by default since zend-filter and zend-validator depend on the PluginManager classes.

0.8.0

27 Apr 07:52
Compare
Choose a tag to compare
0.8.0 Pre-release
Pre-release

Added

  • Nothing.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • #56 fixes unicode characters support. UTF-8 is now
    enforced internally to make this happen. To prevent unwanted output only the first form is returned in
    FormFactory->asString().

0.7.0

16 Apr 08:26
Compare
Choose a tag to compare
0.7.0 Pre-release
Pre-release

Added

  • #55 changes the way a phone number is validated.
    Uses the PhoneNumberValidator only if the country is set. Otherwise fall back to a very loose phone number regex
    pattern validation if the pattern wasn't set already.

Deprecated

Nothing.

Removed

Nothing.

Fixed

Nothing.

0.6.0

05 Apr 16:12
Compare
Choose a tag to compare
0.6.0 Pre-release
Pre-release

Added

  • #50 adds strict types and some performance improvements.

Deprecated

Nothing.

Removed

  • #47 removes temp service manager 3 repositories.
  • #49 removes obsolete ValidationResult functions.

Fixed

Nothing.

0.5.0

29 Feb 07:30
Compare
Choose a tag to compare
0.5.0 Pre-release
Pre-release

Added

  • #43 adds handling disabled form elements. Or better yet,
    they are ignored now.

Deprecated

Nothing.

Removed

Nothing.

Fixed

  • #42 fixes the number type validator.

0.4.0

25 Feb 13:08
Compare
Choose a tag to compare
0.4.0 Pre-release
Pre-release

Added

  • #36 adds the FormFactory->validateRequest() to handle
    PSR-7 requests and reduce boilerplate code needed to build, validate and render forms.

  • #38 adds submit button detection.

    $validationResult->isClicked('confirm'); // returns boolean;
    $validationResult->isClicked(); // returns name of clicked button or null;
  • #39 changes the order of the inputfilter factory and the
    default values in the constructor. The new way to call the constructor is:

    public function __construct($htmlForm, Factory $factory = null, array $defaultValues = []);

Deprecated

Nothing.

Removed

Nothing.

Fixed

  • #38 fixes named submit buttons being detected as a
    validating input value.

0.3.0

22 Feb 14:21
Compare
Choose a tag to compare
0.3.0 Pre-release
Pre-release

Added

  • #27 adds the FormFactoryInterface and
    ValidationResultInterface.
  • #29 adds container-interop compatibility. This enables
    custom validators and filters.
  • #29 adds the InputFilterFactory which can be used to
    instantiate a Zend\InputFilter\Factory from a container-interop compatible container.
  • #30 adds
    • min, max and step attributes for Datetime input types
    • the multiple attribute on select and email elements
    • file element validation options

Deprecated

  • #27 deprecates:
    • ValidationResult->getErrorMessages(), use ValidationResult->getMessages() instead.
    • ValidationResult->getRawInputValues(), use ValidationResult->getRawValues() instead.
    • ValidationResult->getValidValues(), use ValidationResult->getValues() instead.

Removed

Nothing.

Fixed

  • #30 fixes invalid validation regex for the color type.

0.2.0

15 Feb 10:45
Compare
Choose a tag to compare
0.2.0 Pre-release
Pre-release

Added

  • #15 adds support for the maxlength attribute for
    specifc elements.
  • #21 adds the aria-invalid="true" attribute if
    the validation result object is injected into the form renderer: $form->asString($validationResult).
  • #23 adds automatic GitHub
    wiki pages generation from the docs.
  • #26 adds default filters confirm the html specs.
  • #26 adds support for the minlength attribute.
  • #26 adds support for number float validation
    and step="any" to disable the step validator.

Deprecated

Nothing.

Removed

  • #14 removes list and datalist checks since it is a
    global attribute that suggests values, not restrict to a value from the list.

Fixed

  • #15 makes the pattern attribute trigger the regex
    plugin only for specific elements.
  • #21 fixes adding multiple error classes.
  • #24 fixes adding multiple error messages to elements
    with the same name.