@eflexsystems/ember-tracked-validations
Version:
Ember computed property based validation library
45 lines (37 loc) • 738 B
JavaScript
import { tracked } from '@glimmer/tracking';
/**
* @module Validations
* @class Error
*/
export default class ValidationsError {
/**
* The error validator type
* @property type
* @type {String}
*/
type;
/**
* The error message
* @property message
* @type {String}
*/
message;
/**
* The attribute that the error belongs to
* @property attribute
* @type {String}
*/
attribute;
/**
* The parent attribute that the error belongs to
* @property parentAttribute
* @type {String}
*/
parentAttribute;
static create(props) {
return new ValidationsError(props);
}
constructor(props = {}) {
Object.assign(this, props);
}
}