@@ -887,7 +887,46 @@ def Field(
887
887
fail_fast :bool | None = _Unset ,
888
888
** extra :Unpack [_EmptyKwargs ],
889
889
)-> Any : ...
890
- @overload # `default` argument set
890
+ @overload # `default` argument set, validate_default=True (no type checking on the default value)
891
+ def Field (
892
+ default :Any ,
893
+ * ,
894
+ alias :str | None = _Unset ,
895
+ alias_priority :int | None = _Unset ,
896
+ validation_alias :str | AliasPath | AliasChoices | None = _Unset ,
897
+ serialization_alias :str | None = _Unset ,
898
+ title :str | None = _Unset ,
899
+ field_title_generator :Callable [[str ,FieldInfo ],str ]| None = _Unset ,
900
+ description :str | None = _Unset ,
901
+ examples :list [Any ]| None = _Unset ,
902
+ exclude :bool | None = _Unset ,
903
+ discriminator :str | types .Discriminator | None = _Unset ,
904
+ deprecated :Deprecated | str | bool | None = _Unset ,
905
+ json_schema_extra :JsonDict | Callable [[JsonDict ],None ]| None = _Unset ,
906
+ frozen :bool | None = _Unset ,
907
+ validate_default :Literal [True ],
908
+ repr :bool = _Unset ,
909
+ init :bool | None = _Unset ,
910
+ init_var :bool | None = _Unset ,
911
+ kw_only :bool | None = _Unset ,
912
+ pattern :str | typing .Pattern [str ]| None = _Unset ,
913
+ strict :bool | None = _Unset ,
914
+ coerce_numbers_to_str :bool | None = _Unset ,
915
+ gt :annotated_types .SupportsGt | None = _Unset ,
916
+ ge :annotated_types .SupportsGe | None = _Unset ,
917
+ lt :annotated_types .SupportsLt | None = _Unset ,
918
+ le :annotated_types .SupportsLe | None = _Unset ,
919
+ multiple_of :float | None = _Unset ,
920
+ allow_inf_nan :bool | None = _Unset ,
921
+ max_digits :int | None = _Unset ,
922
+ decimal_places :int | None = _Unset ,
923
+ min_length :int | None = _Unset ,
924
+ max_length :int | None = _Unset ,
925
+ union_mode :Literal ['smart' ,'left_to_right' ]= _Unset ,
926
+ fail_fast :bool | None = _Unset ,
927
+ ** extra :Unpack [_EmptyKwargs ],
928
+ )-> Any : ...
929
+ @overload # `default` argument set, validate_default=False or unset
891
930
def Field (
892
931
default :_T ,
893
932
* ,
@@ -904,7 +943,7 @@ def Field(
904
943
deprecated :Deprecated | str | bool | None = _Unset ,
905
944
json_schema_extra :JsonDict | Callable [[JsonDict ],None ]| None = _Unset ,
906
945
frozen :bool | None = _Unset ,
907
- validate_default :bool | None = _Unset ,
946
+ validate_default :Literal [ False ] = ... ,
908
947
repr :bool = _Unset ,
909
948
init :bool | None = _Unset ,
910
949
init_var :bool | None = _Unset ,
@@ -926,7 +965,46 @@ def Field(
926
965
fail_fast :bool | None = _Unset ,
927
966
** extra :Unpack [_EmptyKwargs ],
928
967
)-> _T : ...
929
- @overload # `default_factory` argument set
968
+ @overload # `default_factory` argument set, validate_default=True (no type checking on the default value)
969
+ def Field (# pyright: ignore[reportOverlappingOverload]
970
+ * ,
971
+ default_factory :Callable [[],Any ]| Callable [[dict [str ,Any ]],Any ],
972
+ alias :str | None = _Unset ,
973
+ alias_priority :int | None = _Unset ,
974
+ validation_alias :str | AliasPath | AliasChoices | None = _Unset ,
975
+ serialization_alias :str | None = _Unset ,
976
+ title :str | None = _Unset ,
977
+ field_title_generator :Callable [[str ,FieldInfo ],str ]| None = _Unset ,
978
+ description :str | None = _Unset ,
979
+ examples :list [Any ]| None = _Unset ,
980
+ exclude :bool | None = _Unset ,
981
+ discriminator :str | types .Discriminator | None = _Unset ,
982
+ deprecated :Deprecated | str | bool | None = _Unset ,
983
+ json_schema_extra :JsonDict | Callable [[JsonDict ],None ]| None = _Unset ,
984
+ frozen :bool | None = _Unset ,
985
+ validate_default :Literal [True ],
986
+ repr :bool = _Unset ,
987
+ init :bool | None = _Unset ,
988
+ init_var :bool | None = _Unset ,
989
+ kw_only :bool | None = _Unset ,
990
+ pattern :str | typing .Pattern [str ]| None = _Unset ,
991
+ strict :bool | None = _Unset ,
992
+ coerce_numbers_to_str :bool | None = _Unset ,
993
+ gt :annotated_types .SupportsGt | None = _Unset ,
994
+ ge :annotated_types .SupportsGe | None = _Unset ,
995
+ lt :annotated_types .SupportsLt | None = _Unset ,
996
+ le :annotated_types .SupportsLe | None = _Unset ,
997
+ multiple_of :float | None = _Unset ,
998
+ allow_inf_nan :bool | None = _Unset ,
999
+ max_digits :int | None = _Unset ,
1000
+ decimal_places :int | None = _Unset ,
1001
+ min_length :int | None = _Unset ,
1002
+ max_length :int | None = _Unset ,
1003
+ union_mode :Literal ['smart' ,'left_to_right' ]= _Unset ,
1004
+ fail_fast :bool | None = _Unset ,
1005
+ ** extra :Unpack [_EmptyKwargs ],
1006
+ )-> Any : ...
1007
+ @overload # `default_factory` argument set, validate_default=False or unset
930
1008
def Field (
931
1009
* ,
932
1010
default_factory :Callable [[],_T ]| Callable [[dict [str ,Any ]],_T ],
@@ -943,7 +1021,7 @@ def Field(
943
1021
deprecated :Deprecated | str | bool | None = _Unset ,
944
1022
json_schema_extra :JsonDict | Callable [[JsonDict ],None ]| None = _Unset ,
945
1023
frozen :bool | None = _Unset ,
946
- validate_default :bool | None = _Unset ,
1024
+ validate_default :Literal [ False ] | None = _Unset ,
947
1025
repr :bool = _Unset ,
948
1026
init :bool | None = _Unset ,
949
1027
init_var :bool | None = _Unset ,