Fix minor text issue on number class validations

This commit is contained in:
dgarcia 2020-05-19 15:54:53 +02:00
parent 4f73f1802e
commit b644530fa9

View file

@ -74,14 +74,14 @@ class MCF_Number extends MCF_Type{
case 'max':
this.validations.max = function(value, definition){
if (value > definition.max){
throw new Error(`MCF_Number creation: the value ${value} is higher than the maximum defined: ${definition.maxLength}`);
throw new Error(`MCF_Number creation: the value ${value} is higher than the maximum defined: ${definition.max}`);
}
};
break;
case 'min':
this.validations.min = function(value, definition){
if (value < definition.min){
throw new Error(`MCF_Number creation: the value ${value} is lower than the minimum defined: ${definition.minLength}`);
throw new Error(`MCF_Number creation: the value ${value} is lower than the minimum defined: ${definition.min}`);
}
};
break;