Skip to content

[ Pydantic V2 ](https://docs.pydantic.dev/2.0/blog/pydantic-v2-final/) is here
🚀! Upgrading an existing app? See the [ Migration Guide
](https://docs.pydantic.dev/2.0/migration/) for tips on essential changes from
Pydantic V1!

[ ![logo](../../logo-white.svg) ](../.. "Pydantic")

Pydantic

Fields

Initializing search

[ pydantic/pydantic  ](https://github.com/pydantic/pydantic "Go to
repository")

  * [ Get Started ](../..)
  * [ Concepts ](../models/)
  * [ API Documentation ](../../api/base_model/)
  * [ Examples ](../../examples/secrets/)
  * [ Error Messages ](../../errors/errors/)
  * [ Integrations ](../../integrations/mypy/)
  * [ Blog ](https://blog.pydantic.dev/)
  * [ Pydantic People ](../../pydantic_people/)

[ ![logo](../../logo-white.svg) ](../.. "Pydantic") Pydantic

[ pydantic/pydantic  ](https://github.com/pydantic/pydantic "Go to
repository")

  * Get Started  Get Started 
    * [ Welcome to Pydantic  ](../..)
    * [ Why use Pydantic  ](../../why/)
    * [ Help with Pydantic  ](../../help_with_pydantic/)
    * [ Installation  ](../../install/)
    * [ Migration Guide  ](../../migration/)
    * [ Version Policy  ](../../version-policy/)
    * [ Contributing  ](../../contributing/)
    * [ Changelog  ](../../changelog/)
  * Concepts  Concepts 
    * [ Models  ](../models/)
    * Fields  [ Fields  ](./) Page contents 
      * Default values 
      * Using Annotated 
      * Field aliases 
        * Validation Alias 
      * Numeric Constraints 
      * String Constraints 
      * Decimal Constraints 
      * Dataclass Constraints 
      * Validate Default Values 
      * Field Representation 
      * Discriminator 
      * Strict Mode 
      * Immutability 
      * Exclude 
      * Deprecated fields 
        * deprecated as a string 
        * deprecated via the warnings.deprecated decorator 
        * deprecated as a boolean 
      * Customizing JSON Schema 
      * The computed_field decorator 
    * [ JSON Schema  ](../json_schema/)
    * [ JSON  ](../json/)
    * [ Types  ](../types/)
    * [ Unions  ](../unions/)
    * [ Alias  ](../alias/)
    * [ Configuration  ](../config/)
    * [ Serialization  ](../serialization/)
    * [ Validators  ](../validators/)
    * [ Dataclasses  ](../dataclasses/)
    * [ Postponed Annotations  ](../postponed_annotations/)
    * [ Strict Mode  ](../strict_mode/)
    * [ Type Adapter  ](../type_adapter/)
    * [ Validation Decorator  ](../validation_decorator/)
    * [ Conversion Table  ](../conversion_table/)
    * [ Settings Management  ](../pydantic_settings/)
    * [ Performance  ](../performance/)
    * [ Pydantic Plugins  ](../plugins/)
  * API Documentation  API Documentation 
    * Pydantic  Pydantic 
      * [ BaseModel  ](../../api/base_model/)
      * [ RootModel  ](../../api/root_model/)
      * [ Pydantic Dataclasses  ](../../api/dataclasses/)
      * [ TypeAdapter  ](../../api/type_adapter/)
      * [ Validate Call  ](../../api/validate_call/)
      * [ Fields  ](../../api/fields/)
      * [ Aliases  ](../../api/aliases/)
      * [ Configuration  ](../../api/config/)
      * [ JSON Schema  ](../../api/json_schema/)
      * [ Errors  ](../../api/errors/)
      * [ Functional Validators  ](../../api/functional_validators/)
      * [ Functional Serializers  ](../../api/functional_serializers/)
      * [ Standard Library Types  ](../../api/standard_library_types/)
      * [ Pydantic Types  ](../../api/types/)
      * [ Network Types  ](../../api/networks/)
      * [ Version Information  ](../../api/version/)
      * [ Pydantic Plugins  ](../../api/plugin/)
      * [ Annotated Handlers  ](../../api/annotated_handlers/)
    * Pydantic Core  Pydantic Core 
      * [ pydantic_core  ](../../api/pydantic_core/)
      * [ pydantic_core.core_schema  ](../../api/pydantic_core_schema/)
    * [ Pydantic Settings  ](../../api/pydantic_settings/)
    * Pydantic Extra Types  Pydantic Extra Types 
      * [ Color  ](../../api/pydantic_extra_types_color/)
      * [