@@ -7,7 +7,7 @@ import { z } from 'zod';
77export const ListColumnSchema = z . object ( {
88 field : z . string ( ) . describe ( 'Field name (snake_case)' ) ,
99 label : z . string ( ) . optional ( ) . describe ( 'Display label override' ) ,
10- width : z . number ( ) . optional ( ) . describe ( 'Column width in pixels' ) ,
10+ width : z . number ( ) . positive ( ) . optional ( ) . describe ( 'Column width in pixels' ) ,
1111 align : z . enum ( [ 'left' , 'center' , 'right' ] ) . optional ( ) . describe ( 'Text alignment' ) ,
1212 hidden : z . boolean ( ) . optional ( ) . describe ( 'Hide column by default' ) ,
1313 sortable : z . boolean ( ) . optional ( ) . describe ( 'Allow sorting by this column' ) ,
@@ -27,8 +27,8 @@ export const SelectionConfigSchema = z.object({
2727 * List View Pagination Configuration
2828 */
2929export const PaginationConfigSchema = z . object ( {
30- pageSize : z . number ( ) . default ( 25 ) . describe ( 'Number of records per page' ) ,
31- pageSizeOptions : z . array ( z . number ( ) ) . optional ( ) . describe ( 'Available page size options' ) ,
30+ pageSize : z . number ( ) . int ( ) . positive ( ) . default ( 25 ) . describe ( 'Number of records per page' ) ,
31+ pageSizeOptions : z . array ( z . number ( ) . int ( ) . positive ( ) ) . optional ( ) . describe ( 'Available page size options' ) ,
3232} ) ;
3333
3434/**
@@ -115,7 +115,7 @@ export const FormFieldSchema = z.object({
115115 readonly : z . boolean ( ) . optional ( ) . describe ( 'Read-only override' ) ,
116116 required : z . boolean ( ) . optional ( ) . describe ( 'Required override' ) ,
117117 hidden : z . boolean ( ) . optional ( ) . describe ( 'Hidden override' ) ,
118- colSpan : z . number ( ) . optional ( ) . describe ( 'Column span in grid layout (1-4)' ) ,
118+ colSpan : z . number ( ) . int ( ) . min ( 1 ) . max ( 4 ) . optional ( ) . describe ( 'Column span in grid layout (1-4)' ) ,
119119 widget : z . string ( ) . optional ( ) . describe ( 'Custom widget/component name' ) ,
120120 dependsOn : z . string ( ) . optional ( ) . describe ( 'Parent field name for cascading' ) ,
121121 visibleOn : z . string ( ) . optional ( ) . describe ( 'Visibility condition expression' ) ,
0 commit comments