Releases: aurelia/validation
Releases · aurelia/validation
1.0.0-beta.1.0.0
breaking changes
ValidationError
class renamedValidateResult
. PreviouslyValidationError
represented a broken rule. NowValidateResult
represents the result of evaluating a rule and the pass/fail status is stored in a new boolean property namedvalid
.RenderInstruction
, which is the argument passed to validation renderers, now recievesValidateResult
s instead ofValidationError
s. This means you'll need to skip rendering results whosevalid
property istrue
OR you'll need to add logic to render "success". Examples of both are in the docs.- The
ValidationController
'svalidate
method has a new return type. Previously it wasPromise<ValidationError[]>
. Now it'sPromise<ControllerValidateResult>
. This means you'll need to change code like this:
js controller.validate().then(errors => { if (errors.length === 0) { // valid :) } else { // invalid :( } });
To something like this:
js controller.validate().then(result => { if (result.valid) { // valid :) } else { // invalid :( } });
0.14.0
Bug Fixes
- ValidationController: handle null objects
- build: fix api.json generation
- ValidationParser: handle parenthesis
Features
- validation-rules: validate email as per HTML standard
- package: add tslint
0.13.1
- Documentation fixes.
0.13.0
aurelia-validation 0.13.0
Bug Fixes
- ValidationParser: handle props that are only accessible via bracket syntax
Features
- validation-rules: permit uppercase email
- validateTrigger: add changeOrBlur trigger
- ValidateBindingBehavior: enable specifying validate trigger on individual bindings
- Validator: rule prioritization and bailing
- ValidationControllerFactory: add validator arg to createForCurrentScope
0.12.5
aurelia-validation 0.12.5
Bug Fixes
- ValidationControllerFactory: construct in child container
- ValidationParser: handle "use strict"
0.12.4
- Docs update.
- feat(ValidationError): override toString
0.12.3
aurelia-validation 0.12.3
Features
- RenderInstruction: add 'kind' property
- withMessage: provide access to getDisplayName
- ValidationParser: caching and warnings
- ValidateBindingBehavior: support custom attributes
- ValidationRules: add equals rule
Bug Fixes
- build: turn on declarations flag
- ValidationParser: parse arrow functions
Code Refactoring
- ValidateBindingBehavior: use controller.container API
0.12.2
0.12.1
- Moved rules metadata to a non-enumerable property.
- Fixed an issue with providing string property names to the validation api
0.12.0
- Major update! See the docs up for the details.