fix(SQ/StatusIntValidator): Validation function fixed

Validation function fixed
This commit is contained in:
Noelia 2023-02-23 20:38:19 +01:00 committed by Noelia
parent aecb4816e0
commit 2398b8bd46
1 changed files with 10 additions and 2 deletions

View File

@ -51,7 +51,15 @@ StatusValidator {
validatorObj: IntValidator { bottom: root.bottom; locale: root.locale.name; top: root.top }
validate: function (t) {
// Basic validation management
return root.validatorObj.validate() === IntValidator.Acceptable
let value = parseInt(t)
let floatValue = parseFloat(t)
let nan = isNaN(t)
if(nan || value !== floatValue )
return false
if(value <= root.top && value >= root.bottom)
return true
return false
}
}