work in progress on custom fields

This commit is contained in:
Tomas Bures 2017-08-11 08:51:30 +02:00
parent 361af18384
commit 86fce404a9
29 changed files with 1088 additions and 198 deletions

View file

@ -50,6 +50,12 @@ class DuplicitEmailError extends InteroperableError {
}
}
class DuplicitKeyError extends InteroperableError {
constructor(msg, data) {
super('DuplicitKeyError', msg, data);
}
}
class IncorrectPasswordError extends InteroperableError {
constructor(msg, data) {
super('IncorrectPasswordError', msg, data);
@ -84,6 +90,7 @@ const errorTypes = {
ChildDetectedError,
DuplicitNameError,
DuplicitEmailError,
DuplicitKeyError,
IncorrectPasswordError,
InvalidTokenError,
DependencyNotFoundError,

9
shared/validators.js Normal file
View file

@ -0,0 +1,9 @@
'use strict';
function mergeTagValid(mergeTag) {
return /^[A-Z][A-Z0-9_]*$/.test(mergeTag);
}
module.exports = {
mergeTagValid
};