Fix minor text issue on number class validations
This commit is contained in:
parent
4f73f1802e
commit
b644530fa9
1 changed files with 2 additions and 2 deletions
|
@ -74,14 +74,14 @@ class MCF_Number extends MCF_Type{
|
||||||
case 'max':
|
case 'max':
|
||||||
this.validations.max = function(value, definition){
|
this.validations.max = function(value, definition){
|
||||||
if (value > definition.max){
|
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;
|
break;
|
||||||
case 'min':
|
case 'min':
|
||||||
this.validations.min = function(value, definition){
|
this.validations.min = function(value, definition){
|
||||||
if (value < definition.min){
|
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;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue