# generated by datamodel-codegen:
#   filename:  field_validators.json

from __future__ import annotations

from typing import Any

from myapp.validators import validate_name_plain
from pydantic import BaseModel, EmailStr, conint, field_validator


class User(BaseModel):
    name: str
    email: EmailStr
    age: conint(ge=0) | None = None

    @field_validator('name', mode='plain')
    @classmethod
    def validate_name_plain_validator(cls, v: Any) -> Any:
        return validate_name_plain(v)
