File tree Expand file tree Collapse file tree 5 files changed +11
-15
lines changed
packages/pydantic-forms/src Expand file tree Collapse file tree 5 files changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -159,15 +159,6 @@ class Person2(BaseModel):
159159]
160160
161161
162- def is_maurits (val : str ) -> bool :
163- if val != "Maurits" :
164- raise ValueError ("Has to be Maurits!" )
165- return True
166-
167-
168- StringExample = Annotated [str , Predicate (is_maurits )]
169-
170-
171162@app .post ("/form" )
172163async def form (form_data : list [dict ] = []):
173164 def form_generator (state : State ):
Original file line number Diff line number Diff line change 1+ ---
2+ ' pydantic-forms ' : patch
3+ ---
4+
5+ Bugfix
Original file line number Diff line number Diff line change 11import React from 'react' ;
22
3- import { isObject } from 'lodash' ;
3+ import _ from 'lodash' ;
44
55import type { PydanticFormControlledElementProps } from '@/types' ;
66
@@ -19,7 +19,7 @@ export const IntegerField = ({
1919 } }
2020 disabled = { disabled }
2121 // Value will be an object when it is added by an array field. We do this be able to add more than one empty field
22- value = { isObject ( value ) ? undefined : value }
22+ value = { _ . isObject ( value ) ? undefined : value }
2323 type = "number"
2424 style = { {
2525 padding : '8px' ,
Original file line number Diff line number Diff line change 55 */
66import React from 'react' ;
77
8- import { isObject } from 'lodash' ;
8+ import _ from 'lodash' ;
99
1010import { PydanticFormControlledElementProps } from '@/types' ;
1111
@@ -22,7 +22,7 @@ export const TextField = ({
2222 } }
2323 disabled = { disabled }
2424 // Value will be an object when it is added by an array field. We do this be able to add more than one empty field
25- value = { isObject ( value ) ? '' : value }
25+ value = { _ . isObject ( value ) ? '' : value }
2626 type = "text"
2727 style = { {
2828 padding : '8px' ,
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import type { ReactNode } from 'react' ;
33
4- import { merge } from 'lodash' ;
4+ import _ from 'lodash' ;
55import { IntlErrorCode , NextIntlClientProvider } from 'next-intl' ;
66
77import { TranslationsJSON } from '@/types' ;
@@ -50,7 +50,7 @@ export const TranslationsProvider = ({
5050 }
5151 } ;
5252
53- const messages = merge ( localMessages , customTranslations ) ;
53+ const messages = _ . merge ( localMessages , customTranslations ) ;
5454
5555 return (
5656 < NextIntlClientProvider
You can’t perform that action at this time.
0 commit comments