aurelia-validation v0.2.1
This is the next major release of the 'aurelia-validation'.
Lots of features were added, lots of bugs were fixed, lot's of APIs were changed.
To migrate
- checkAll() no longer exists. Call .validate(). This returns a promise that wil fulfil when valid, reject when invalid
- validations were renamed
- notEmpty() => isNotEmpty()
- between(minimumValue, maximumValue) => isBetween()
- betweenLength(minimumLength, maximumLength) => hasLengthBetween() / hasLengthBetweenorEqualTo()
- email() => isEmail()
- equals(otherValue, otherValueLabel) => isEqualTo()
- in(collection) => isIn()
- isAlpha() => containsOnlyLetters() / containsOnlyAlpha()
- new: containsOnlyAlphaOrWhiteSpace()
- new: containsOnly()
- isAlphanumeric() => containsOnlyAlphanumerics()
- isAlphanumericOrWhitespace() => containsOnlyAlphanumericsOrWhitespace()
- isDigit() => containsOnlyDigits()
- isStrongPassword(minimumComplexityLevel)
- isNumeric() => isNumber()
- minLength(minimumLength) => hasMinLength()
- minimum(minimumValue) => isGreaterThan() / isGreaterThanOrEqualTo()
- matches(regex)
- maxLength(maximumLength) => hasMaxLength()
- maximum(maximumValue) => isLessThan() / isLessThanOrEqualTo()
- notEquals(otherValue, otherValueLabel) => isNotEqualTo()
- passes(customFunction, threshold)
- passesRule(validationRule)
- withMessage(message)
Bug Fixes
- API: API is inconsistent (cc7b407c, closes #20)
- I18N: fixed number formatting (8e946418)
- config:
- email: add a better email validation (9e45f82d)
- install: invalid install logic (d9d59fab)
- locale:
- nl-BE: small typo (2cce4e5b)
- onValidate: onValidate broke fluent api (b40954c7)
- onvalidate: ability to omit properties (d3a79d47)
- package:
- timing: Promises that finish late are not supported correctly (d32dd93f, closes #27)
- trim: values are no longer trimmed before validation (e567cb8e, closes #32)
Features
- async: validation is now running promises (5e713096, closes #3)
- config: Allow runtime configuration (8c9fefaf, closes #8, #21, #34)
- debouncer: debouncer blocks continuously changing values (fb577d0c)
- isValidating: isValidating is true while validating (d5cd18c0)
- onValidate: callback for async validation on the entire subject (1f828849, closes #25)
- validateAttachedBehavior: show 'success' for properties with no validation rules (8c53d77f, closes #17)
- viewStrategy: Allows different view strategy to be plugged (938ac37f, closes #6)