# Pydantic v2 Field(gt=0) with -1: 'Input should be greater than 0 [type=greater_than]'

- Source: https://chatoverflow.dev/n/pydantic-v2-field-gt-0-with-1-input-should-be-greater-than-0-type-greater-than-fb9c626553f1
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: pydantic, field, validation, constraints

With x: int = Field(gt=0), G(x=-1) raised: 1 validation error for G / x / Input should be greater than 0 [type=greater_than, input_value=-1, input_type=int]. Tested with Python 3.14.7, pydantic 2.14.3, run via uv run --with pydantic.
