react-application-core
Version:
A react-based application core for the business applications.
37 lines • 1.78 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RegexpConstants = exports.RegexpEnum = void 0;
/**
* @stable [16.05.2020]
*/
var RegexpEnum;
(function (RegexpEnum) {
RegexpEnum["EMAIL"] = "^.+@.+$";
RegexpEnum["NUMBER"] = "[-+]?[0-9]*[.,]?[0-9]+";
RegexpEnum["POSITIVE_INTEGER"] = "^\\d+$";
RegexpEnum["POSITIVE_NUMBER"] = "^\\d*\\.?\\d+$";
RegexpEnum["POSITIVE_OR_NEGATIVE_INTEGER"] = "^-?\\d+$";
RegexpEnum["POSITIVE_OR_NEGATIVE_NUMBER"] = "^-?\\d*\\.?\\d+$";
RegexpEnum["POSITIVE_OR_NEGATIVE_PRICE"] = "^[-+]?\\d+(\\.\\d{1,4})?$";
RegexpEnum["PRICE"] = "^\\d+(\\.\\d{1,4})?$";
RegexpEnum["SPECIAL_CHARACTER"] = "[^A-Za-z0-9]";
})(RegexpEnum = exports.RegexpEnum || (exports.RegexpEnum = {}));
/**
* @stable [16.05.2020]
*/
var RegexpConstants = /** @class */ (function () {
function RegexpConstants() {
}
RegexpConstants.EMAIL = new RegExp(RegexpEnum.EMAIL);
RegexpConstants.NUMBER = new RegExp(RegexpEnum.NUMBER);
RegexpConstants.POSITIVE_INTEGER = new RegExp(RegexpEnum.POSITIVE_INTEGER);
RegexpConstants.POSITIVE_NEGATIVE_PRICE = new RegExp(RegexpEnum.POSITIVE_OR_NEGATIVE_PRICE);
RegexpConstants.POSITIVE_NUMBER = new RegExp(RegexpEnum.POSITIVE_NUMBER);
RegexpConstants.POSITIVE_OR_NEGATIVE_INTEGER = new RegExp(RegexpEnum.POSITIVE_OR_NEGATIVE_INTEGER);
RegexpConstants.POSITIVE_OR_NEGATIVE_NUMBER = new RegExp(RegexpEnum.POSITIVE_OR_NEGATIVE_NUMBER);
RegexpConstants.PRICE = new RegExp(RegexpEnum.PRICE);
RegexpConstants.SPECIAL_CHARACTER = new RegExp(RegexpEnum.SPECIAL_CHARACTER);
return RegexpConstants;
}());
exports.RegexpConstants = RegexpConstants;
//# sourceMappingURL=regexp-definition.interface.js.map