bundles / nbformat latest / nbformat / validator / validate
function
nbformat.validator:validate
source: /nbformat/validator.py:388
Signature
def validate(nbdict: Any = None, ref: str | None = None, version: int | None = None, version_minor: int | None = None, relax_add_props: bool = False, nbjson: Any = None) → NoneSummary
Checks whether the given notebook dict-like object conforms to the relevant notebook format schema.
Parameters
nbdict: dictnotebook document
ref: optional, strreference to the subset of the schema we want to validate against. for example
"markdown_cell","code_cell"....version: intversion_minor: intrelax_add_props: boolWhether to allow extra properties in the JSON schema validating the notebook. When True, all known fields are validated, but unknown fields are ignored.
nbjson
Returns
: None
Raises
: ValidationError if not valid.
Notes
Please explicitly call normalize if you need to normalize notebooks.
Aliases
nbformat.validate