Skip to content

Commit

Permalink
rename validate method to model_validate, for consistency with py…
Browse files Browse the repository at this point in the history
…dantic changes

Signed-off-by: ff137 <[email protected]>
  • Loading branch information
ff137 committed Mar 26, 2024
1 parent dcb71bd commit a9ff3f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pydid/did.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def is_valid(cls, did: str):
return DID_PATTERN.match(did)

@classmethod
def validate(cls, did: str):
def model_validate(cls, did: str):
"""Validate the given string as a DID."""
if not cls.is_valid(did):
raise InvalidDIDError('"{}" is not a valid DID'.format(did))
Expand Down

0 comments on commit a9ff3f2

Please sign in to comment.