Skip to content

Commit 45e9a6a

Browse files
authored
Accept lowercase prefixes in Spanish NIE validation
1 parent 22786cc commit 45e9a6a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/validators/i18n/es.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def es_nie(value: str, /):
135135
"""
136136
number_by_letter = {"X": "0", "Y": "1", "Z": "2"}
137137
# NIE must must start with X Y or Z
138-
if value and value[0] in number_by_letter:
138+
if value and value[0].upper() in number_by_letter:
139139
return _nif_nie_validation(value, number_by_letter)
140140
return False
141141

0 commit comments

Comments
 (0)