ember-cp-validations
Version:
Ember computed property based validation library
27 lines (25 loc) • 517 B
JavaScript
import EmberValidator from 'ember-cp-validations/-private/ember-validator';
/**
* <i class="fa fa-hand-o-right" aria-hidden="true"></i> [See All Options](#method_validate)
*
* Validates the length of the attributes’ values.
*
* ## Examples
*
* ```javascript
* validator('length', {
* is: 15
* })
* validator('length', {
* min: 5,
* max: 10
* })
* ```
*
* @class Length
* @module Validators
* @extends Base
*/
export default EmberValidator.extend({
_evType: 'length',
});