feat: adds decimals validator method

This commit is contained in:
2024-12-08 23:02:13 -03:00
parent 6b9b5e201f
commit ff9d94bb72

View File

@@ -10,3 +10,11 @@ class Validators:
if(regex.match(string) is not None): if(regex.match(string) is not None):
return True return True
return False return False
@staticmethod
def is_valid_decimal(value: str):
try:
float(value)
return True
except:
return False