fix: update form context to use rules instead of defaultValue for field validation
parent
c6d08a4d58
commit
c77fb9c84a
|
@ -43,7 +43,7 @@ export function useFormInitial(
|
|||
if (Reflect.has(item, 'defaultValue')) {
|
||||
set(initialValues, item.fieldName, item.defaultValue);
|
||||
} else if (item.rules && !isString(item.rules)) {
|
||||
set(zodObject, item.fieldName, item.defaultValue);
|
||||
set(zodObject, item.fieldName, item.rules);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue