File tree Expand file tree Collapse file tree 7 files changed +26
-25
lines changed
packages/pydantic-forms/src Expand file tree Collapse file tree 7 files changed +26
-25
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' pydantic-forms ' : patch
3+ ---
4+
5+ Exports util functions and RenderFields component. Bugfixes
Original file line number Diff line number Diff line change 1+ ---
2+ ' pydantic-forms ' : patch
3+ ---
4+
5+ Show minus button in ArrayField even if min_items value is not provided.
Original file line number Diff line number Diff line change @@ -46,15 +46,9 @@ export const ArrayField = ({ pydanticFormField }: PydanticFormElementProps) => {
4646 ] }
4747 extraTriggerFields = { [ arrayName ] }
4848 />
49- { ! minItems ||
50- ( minItems && fields . length > minItems && (
51- < span
52- style = { { fontSize : '24px' } }
53- onClick = { ( ) => remove ( index ) }
54- >
55- -
56- </ span >
57- ) ) }
49+ { ( ! minItems || ( minItems && fields . length > minItems ) ) && (
50+ < span onClick = { ( ) => remove ( index ) } > -</ span >
51+ ) }
5852 </ div >
5953 ) ;
6054 } ;
Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ export * from './FormRenderer';
33export * from './RenderForm' ;
44export * from './RenderFormErrors' ;
55export * from './RenderReactHookFormErrors' ;
6+ export * from './RenderFields' ;
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export const zodValidationPresets: PydanticFormZodValidationPresets = {
3737 try {
3838 validationRule = validationRule ?. regex (
3939 new RegExp ( pattern ) ,
40- ' De invoer is niet volgens het juiste formaat' ,
40+ ` De invoer is niet volgens het juiste formaat: ${ pattern } ` ,
4141 ) ;
4242 } catch ( error ) {
4343 console . error (
Original file line number Diff line number Diff line change @@ -2,3 +2,4 @@ export * from './types';
22export * from './PydanticForm' ;
33export * from './core' ;
44export * from './components' ;
5+ export * from './utils' ;
Original file line number Diff line number Diff line change @@ -106,11 +106,7 @@ export interface PydanticFormField {
106106 oneOf ?: PydanticFormFieldAnyOfDef [ ] ;
107107 allOf ?: PydanticFormFieldAnyOfDef [ ] ;
108108
109- uniforms ?: {
110- disabled : boolean ;
111- sensitive : boolean ;
112- password : boolean ;
113- } ;
109+ uniforms ?: UniformProperties ;
114110 arrayItem ?: PydanticFormField ;
115111 properties ?: Properties ;
116112}
@@ -436,11 +432,7 @@ export interface PydanticFormPropertySchemaParsed
436432 default ?: string | null ;
437433 format : PydanticFormFieldFormat ;
438434
439- uniforms ?: {
440- disabled : boolean ;
441- sensitive : boolean ;
442- password : boolean ;
443- } ;
435+ uniforms ?: UniformProperties ;
444436
445437 properties ?: ParsedProperties ;
446438}
@@ -470,6 +462,13 @@ export interface PydanticFormFieldAnyOfItemParsed
470462 properties ?: ParsedProperties ;
471463}
472464
465+ type UniformProperties = {
466+ disabled : boolean ;
467+ sensitive : boolean ;
468+ password : boolean ;
469+ [ key : string ] : string | boolean | number ;
470+ } ;
471+
473472export interface PydanticFormPropertySchemaRawJson
474473 extends Omit < PydanticFormBaseSchema , 'type' > ,
475474 PydanticFormFieldValidations ,
@@ -483,11 +482,7 @@ export interface PydanticFormPropertySchemaRawJson
483482 default ?: string | null ;
484483 format : PydanticFormFieldFormat ;
485484
486- uniforms ?: {
487- disabled : boolean ;
488- sensitive : boolean ;
489- password : boolean ;
490- } ;
485+ uniforms ?: UniformProperties ;
491486
492487 properties ?: RawJsonProperties ;
493488}
You can’t perform that action at this time.
0 commit comments