Validators
- class vng_api_common.validators.AlphanumericExcludingDiacritic(*args, **kwargs)
Alle alfanumerieke tekens m.u.v. diacrieten.
RGBZ heeft hier een vreemde definitie voor. De oorsprong is dat dit gek is voor bestandsnamen, en dus speciale karakters uitgesloten worden.
- deconstruct()
Return a 3-tuple of class import path, positional arguments, and keyword arguments.
- class vng_api_common.validators.BaseIdentifierValidator(value: str, validate_11proef: bool = False)
Validator base class that performs common validation logic. Digit check, length, and optional 11-proof check.
- validate_11proefnumber() None
Validates the value based on the 11-proof check.
- validate_isdigit() None
Validates that the value contains only digits.
- class vng_api_common.validators.InformatieObjectUniqueValidator(parent_field, field: str)
- class vng_api_common.validators.IsImmutableValidator
Valideer dat de waarde van het veld niet wijzigt bij een update actie.
- class vng_api_common.validators.PublishValidator(resource: str, oas_schema: str, *args, **kwargs)
Validate that the URL actually resolves to a published resource (concept=False)
- class vng_api_common.validators.ResourceValidator(resource: str, oas_schema: str, *args, **kwargs)
Validate that the URL resolves to an instance of the external resource.
- Parameters:
resource – name of the resource, e.g. ‘zaak’
oas_schema – URL to the schema to validate the response object shape against. Must be a YAML OAS 3.0.x spec.
- class vng_api_common.validators.URLValidator(get_auth: Callable = None, **extra)
Validate that the URL actually resolves to a HTTP 200
Any extra init kwargs are passed down to the underlying
link_fetcher- Parameters:
get_auth – a callable returning appropriate headers to authenticate against the remote.
- class vng_api_common.validators.UniekeIdentificatieValidator(organisatie_field: str, identificatie_field='identificatie')
Valideer dat de identificatie binnen de organisatie uniek is.
Indien de identificatie niet expliciet opgegeven is, wordt ervan uitgegaan dat de identificatie-generator uniciteit garandeert.
- Parameters:
organisatie_field – naam van het veld dat de organisatie RSIN bevat
identificatie_field – naam van het veld dat de identificatie bevat
- class vng_api_common.validators.UntilNowValidator(*args, **kwargs)
Validate a datetime to not be in the future.
This means that now is included.
Some leeway can be added with the TIME_LEEWAY setting.
- deconstruct()
Return a 3-tuple of class import path, positional arguments, and keyword arguments.
- class vng_api_common.validators.UntilTodayValidator(*args, **kwargs)
- vng_api_common.validators.validate_bsn(value: str) None
Validates that a string value is a valid BSN number by applying the ‘11-proef’ checking.
- Parameters:
value – String object representing a presumably good BSN number.
- vng_api_common.validators.validate_non_negative_string(value)
Validate a string containing a integer to be non-negative.
- vng_api_common.validators.validate_rsin(value: str) None
Validates that a string value is a valid RSIN number by applying the ‘11-proef’ checking.
- Parameters:
value – String object representing a presumably good RSIN number.