Releases: aurelia/validatejs
Releases · aurelia/validatejs
0.7.0
0.6.0
- Release sync.
0.5.2
- Add typings.json
0.5.1
- Fixing various bugs. Sorry for lack of details, our chagelog generation is temporarily out of commission.
0.5.0
- Major new implementation. See blog post for details.
0.4.0
0.3.1
0.3.0
Breaking changes -
Validator / Fluent API
The Validator class for the fluent API should not be injected because it should not be a singleton. The developer should switch this -
static inject = [Validator];
constructor(validator) {
this.validator = validator
.ensure(this.model, 'firstName')
.required();
}
to this -
constructor() {
this.validator = new Validator(this.model)
.ensure('firstName')
.required();
}
You can also see that the fluent API has been refactored to reduce duplication and clean up usage. More information is here - #17
You can also now manually validate instances that use decorators like this -
class Model {
@required firstName = '';
}
this.model = new Model();
this.validator = new Validator(this.model);
this.validator.validate();
Fixes -
You can now pass configuration objects to all validation rules. There was previously an issue with a few of the rules mentioned here - #41