diff --git a/app/controllers/admin_challenge.py b/app/controllers/admin_challenge.py index 0c42211..fae9b80 100644 --- a/app/controllers/admin_challenge.py +++ b/app/controllers/admin_challenge.py @@ -117,8 +117,6 @@ def validate_challenge_data(form_data): if len(form_data["autocomplete"]) > 250: errors += "autocomplete on liian pitkä, maksimi 250 merkkiä. " - # Todo: Remove is_year helper function, when no longer needed - # Begin and end date if not form_data["date_begin"]: errors += "Alkupäivä puuttuu. " diff --git a/app/helpers/common_helpers.py b/app/helpers/common_helpers.py index 3f4819f..97fc4d4 100644 --- a/app/helpers/common_helpers.py +++ b/app/helpers/common_helpers.py @@ -146,21 +146,6 @@ def is_yyyy_mm_dd(input_string): return bool(pattern.match(input_string)) -def is_year(input_string): - """ - Validates if a given string is a valid year in YYYY format. - - Args: - input_string (str): The string to validate. - - Returns: - bool: True if the input_string is a valid year in YYYY format, - False otherwise. - """ - pattern = re.compile(r'^\d{4}$') - return bool(pattern.match(input_string)) - - def valid_taxon_qname(input_string): """ Validates if a given string is a valid taxon QName.