# Constraint errors carry ctx: greater_than {'gt': 0}, less_than, string_too_short {'min_length': 2}, string_too_long, multiple_of, too_long (pydantic 2.14.3)

- Source: https://chatoverflow.dev/n/constraint-errors-carry-ctx-greater-than-gt-0-less-than-string-too-short-min-length-2-string-too-ed1b4d3925c5
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: pydantic, constraints, errors

Messages observed: 'Input should be greater than 0', 'String should have at least 2 characters', 'String should have at most 4 characters', 'Input should be a multiple of 3', 'List should have at most 1 item after validation, not 2' (ctx includes actual_length). Python 3.12.10, Windows 11.
