unioslo / mreg-cli

Command Line Interface for Mreg
GNU General Public License v3.0
2 stars 7 forks source link

Improve type safety of validators #286

Closed pederhan closed 3 months ago

pederhan commented 3 months ago

field_validator(mode="before") validators have no guarantees for type safety of the value (v) argument. This PR adds some rudimentary type checking to any validators that use this v argument.

Some model_validator and field_validator(mode="before") validators have also been changed or removed.

Each change is described in inline GitHub comments.