feat: Update profile json validator for year of birth
fix:
@@ -24,7 +24,6 @@ def validate_translation_data(source_data, translation_data, translation_file):
validate_field_1(source_data, translation_data, translation_file)
validate_field_2(source_data, translation_data, translation_file)
validate_field_3(source_data, translation_data, translation_file)
- validate_field_4(source_data, translation_data, translation_file)
def validate_field_0(source_data, translation_data, translation_file):
@@ -64,38 +63,6 @@ def validate_field_1(source_data, translation_data, translation_file):
validator_util.match_property(i, "name", source_data, translation_data,
translation_file)
# type
- validator_util.match_property(i, "type", source_data, translation_data,
- translation_file)
- # ["options"]["range_min"]
- validator_util.match_particular_property(i,
- source_data[i]["options"]
- ["range_min"],
- translation_data[i]["options"]
- ["range_min"],
- translation_file)
- # ["options"]["range_max"]
- validator_util.match_particular_property(i,
- source_data[i]["options"]
- ["range_max"],
- translation_data[i]["options"]
- ["range_max"],
- translation_file)
- # ["options"]["allows_none"]
- validator_util.match_particular_property(i,
- source_data[i]["options"]
- ["allows_none"],
- translation_data[i]["options"]
- ["allows_none"],
- translation_file)
-
-
-def validate_field_2(source_data, translation_data, translation_file):
- # index
- i = 2
- # name
- validator_util.match_property(i, "name", source_data, translation_data,
- translation_file)
- # type
validator_util.match_property(i, "type", source_data, translation_data,
translation_file)
# data_type
@@ -117,9 +84,9 @@ def validate_field_2(source_data, translation_data, translation_file):
translation_file)
-def validate_field_3(source_data, translation_data, translation_file):
+def validate_field_2(source_data, translation_data, translation_file):
# index
- i = 3
+ i = 2
# name
validator_util.match_property(i, "name", source_data, translation_data,
translation_file)
@@ -145,9 +112,9 @@ def validate_field_3(source_data, translation_data, translation_file):
translation_file)
-def validate_field_4(source_data, translation_data, translation_file):
+def validate_field_3(source_data, translation_data, translation_file):
# index
- i = 4
+ i = 3
# name
validator_util.match_property(i, "name", source_data, translation_data,
translation_file)
