Skip to content

Commit

Permalink
model._string_constraints: Add documentation what AASd-130 is
Browse files Browse the repository at this point in the history
  • Loading branch information
s-heppner authored Oct 6, 2023
1 parent 7661123 commit ebc518c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion basyx/aas/model/_string_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def check(value: str, type_name: str, min_length: int = 0, max_length: Optional[
if pattern is not None and not pattern.fullmatch(value):
raise ValueError(f"{type_name} must match the pattern '{_unicode_escape(pattern.pattern)}'! "
f"(value: '{_unicode_escape(value)}')")
# Constraint AASd-130
# Constraint AASd-130: an attribute with data type "string" shall consist of these characters only:
if not AASD130_RE.fullmatch(value):
# It's easier to implement this as a ValueError, because otherwise AASConstraintViolation would need to be
# imported from `base` and the ConstrainedLangStringSet would need to except AASConstraintViolation errors
Expand Down

0 comments on commit ebc518c

Please sign in to comment.