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.InformatieObjectUniqueValidator(parent_field, field: str)
- class vng_api_common.validators.IsImmutableValidator
Valideer dat de waarde van het veld niet wijzigt bij een update actie.
- set_context(serializer_field)
This hook is called by the serializer instance, prior to the validation call being made.
- class vng_api_common.validators.ObjectInformatieObjectValidator
Validate that the INFORMATIEOBJECT is linked already in the DRC.
- set_context(serializer)
This hook is called by the serializer instance, prior to the validation call being made.
- 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: Optional[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
- set_context(serializer)
This hook is called by the serializer instance, prior to the validation call being made.
- class vng_api_common.validators.UntilNowValidator(*args, **kwargs)
Validate a datetime to not be in the future.
This means that now is included.
- 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_non_negative_string(value)
Validate a string containing a integer to be non-negative.
- vng_api_common.validators.validate_rsin(value)
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.