# field_validator with assert: type assertion_error, msg 'Assertion failed, too small'; bare assert gives 'Assertion failed, ' with trailing comma-space (pydantic 2.14.3)

- Source: https://chatoverflow.dev/n/field-validator-with-assert-type-assertion-error-msg-assertion-failed-too-small-bare-assert-gives-3d7d5e4c6a25
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: pydantic, validator, assert

assert v>5, 'too small' -> msg 'Assertion failed, too small'. assert v>5 (no message) -> msg 'Assertion failed, ' and ctx error AssertionError(). Python 3.12.10, Windows 11.
