-
-
Save nvie/b1cf8227802c0ec9e292bf47cd29053c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Define types of building blocks | |
SUBDOMAIN = STRING.set('validate', validate_subdomain) | |
... | |
@schema({ | |
'data': NESTED({ | |
'type': WEBSPACE_TYPE, | |
'attributes': NESTED({ | |
'subdomain': SUBDOMAIN, | |
'domain': DOMAIN, | |
'description': OPTIONAL(STRING), | |
}).set('validate', check_fqdn_len) | |
}) | |
}) | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment