Skip to content

Commit

Permalink
improved regex
Browse files Browse the repository at this point in the history
  • Loading branch information
davidvlaminck committed Dec 19, 2024
1 parent 9e8f1cc commit e96cf94
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self, naam: str, label: str, objectUri: str, definition: str, owner
def validate(cls, value, attribuut) -> bool:
if not StringField.validate(value, attribuut):
return False
if re.match(r'^[a-zA-Z0-9.\-_]*$', value) is None:
if re.match(r'^[\w.\-]*$', value) is None:
return False
if hasattr(attribuut.owner, 'naampad') and attribuut.owner.naampad is not None:
return attribuut.owner.naampad.split('/')[-1] == value
Expand Down

0 comments on commit e96cf94

Please sign in to comment.