aboutsummaryrefslogtreecommitdiff
path: root/quality_control/standard_error.py
diff options
context:
space:
mode:
Diffstat (limited to 'quality_control/standard_error.py')
-rw-r--r--quality_control/standard_error.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/quality_control/standard_error.py b/quality_control/standard_error.py
index 9a91d1b..ae1e378 100644
--- a/quality_control/standard_error.py
+++ b/quality_control/standard_error.py
@@ -4,4 +4,9 @@ import re
from .errors import InvalidValue
def valid_value(val):
- return None
+ if re.search("^[0-9]+\.[0-9]{6,}$", val):
+ return float(val)
+ raise InvalidValue(
+ f"Invalid value '{val}'.\n"
+ "Expected string representing a number with at least six decimal "
+ "places.")