diff --git a/app/utils/validators/validators.py b/app/utils/validators/validators.py index a5e5d02..c076831 100644 --- a/app/utils/validators/validators.py +++ b/app/utils/validators/validators.py @@ -9,4 +9,12 @@ class Validators: regex = re.compile(pattern) if(regex.match(string) is not None): return True - return False \ No newline at end of file + return False + + @staticmethod + def is_valid_decimal(value: str): + try: + float(value) + return True + except: + return False \ No newline at end of file