import{__extends as r}from"../../../../../../../node_modules/tslib/tslib.es6.js";import{Entity as e}from"./Entity.js";import{ValidatorType as t}from"../FormGeneratorEnums/ValidatorTypeEnum.js";var n=function(e){function n(r){var n,o,l=e.call(this)||this;return l.type=null!==(n=null==r?void 0:r.type)&&void 0!==n?n:t.NONE,l.errorMessage=null!==(o=null==r?void 0:r.errorMessage)&&void 0!==o?o:"",l}return r(n,e),n}(e),o=function(e){function n(r){var n,o;return e.call(this,{type:null!==(n=null==r?void 0:r.type)&&void 0!==n?n:t.REQUIRED,errorMessage:null!==(o=null==r?void 0:r.errorMessage)&&void 0!==o?o:"Field should not be empty!"})||this}return r(n,e),n.prototype.toJson=function(){return{type:this.type,errorMessage:this.errorMessage}},n}(n),l=function(e){function n(r){var n,o,l,i=e.call(this,{type:null!==(n=null==r?void 0:r.type)&&void 0!==n?n:t.REGEX,errorMessage:null!==(o=null==r?void 0:r.errorMessage)&&void 0!==o?o:"Field not match with pattern!"})||this;return i.pattern=null!==(l=null==r?void 0:r.pattern)&&void 0!==l?l:"",i}return r(n,e),n.prototype.toJson=function(){return{type:this.type,errorMessage:this.errorMessage,pattern:this.pattern}},n}(n),i=function(e){function n(r){var n,o,l;return e.call(this,{type:null!==(n=null==r?void 0:r.type)&&void 0!==n?n:t.EMAIL,pattern:null!==(o=null==r?void 0:r.pattern)&&void 0!==o?o:"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$",errorMessage:null!==(l=null==r?void 0:r.errorMessage)&&void 0!==l?l:"Should be valid email format!"})||this}return r(n,e),n}(l),u=function(e){function n(r){var n,o,l;return e.call(this,{type:null!==(n=null==r?void 0:r.type)&&void 0!==n?n:t.NUMERIC,pattern:null!==(o=null==r?void 0:r.pattern)&&void 0!==o?o:"^[0-9]*$",errorMessage:null!==(l=null==r?void 0:r.errorMessage)&&void 0!==l?l:"Should be numeric format!"})||this}return r(n,e),n}(l);export{i as EmailValidatorEntity,u as NumericValidatorEntity,l as RegexValidatorEntity,o as RequiredValidatorEntity,n as ValidatorEntity};
//# sourceMappingURL=Validator.js.map
