module.exports = ValidationError;
/**
* An Error object for validation errors with a text error name, translation key and params
* @param {String} name The error name (e.g. 'name_already_used')
* @param {String} translationKey A key to the translation file for this error text (eg. )
* @param {[String]} params The error message params (e.g. ['General'])
* @returns {ValidationError} The new ValidationError instance
*/
function ValidationError(name, translationKey, params) {
this.name = name;
this.translationKey = translationKey;
this.params = params;
}
|