Releases: xtreamwayz/html-form-validator
html-form-validator 1.0.1
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
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 thevalidation-error
css class. The failing input element already got thearia-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 optionalZend\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 aFormInterface
, which has basically the same interface as the previous returnedFormFactoryInterface
. Only the form related logic has moved from theFormFactory
into aForm
class.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Nothing.
0.9.0
Added
- #59 checks if a request method is set and if it's a post
when callingvalidate()
. 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
0.7.0
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
0.5.0
0.4.0
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
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
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
andstep="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.