jerrynavi / ionic-react-forms Goto Github PK
View Code? Open in Web Editor NEWForms and Validation in Ionic React
Forms and Validation in Ionic React
I just read the blog post on your website. It looked really cool. But, when I tried to follow the steps, there are many errors. Looks like you have written the code using react-hook-form@5
. I am currently using [email protected]
and there are a lot of breaking changes.
Can you please update the code to fit current version? This is my first time using this library. So, I don't know how to implement it and what's wrong.
Here are the issues I encountered:
Module '"react-hook-form"' has no exported member 'NestDataObject'.
Type '{ as: Element; name: string; control: Control<FieldValues> | undefined; onChangeName: string; }' is not assignable to type 'IntrinsicAttributes & { render: ({ field, fieldState, formState, }: { field: ControllerRenderProps<FieldValues, string>; fieldState: ControllerFieldState; formState: UseFormStateReturn<...>; }) => ReactElement<...>; } & UseControllerProps<...>'.
Property 'as' does not exist on type 'IntrinsicAttributes & { render: ({ field, fieldState, formState, }: { field: ControllerRenderProps<FieldValues, string>; fieldState: ControllerFieldState; formState: UseFormStateReturn<...>; }) => ReactElement<...>; } & UseControllerProps<...>'.
Property 'errors' does not exist on type 'UseFormReturn<FieldValues>'.
Argument of type '{ validationSchema: ObjectSchema<Assign<ObjectShape, { email: RequiredStringSchema<string | undefined, Record<string, any>>; password: RequiredStringSchema<string | undefined, Record<...>>; }>, Record<...>, TypeOfShape<...>, AssertsShape<...>>; }' is not assignable to parameter of type 'Partial<{ mode: keyof ValidationMode; reValidateMode: "onBlur" | "onChange" | "onSubmit"; defaultValues: { [x: string]: any; }; resolver: Resolver<FieldValues, object>; context: object; shouldFocusError: boolean; shouldUnregister: boolean; criteriaMode: CriteriaMode; }>'.
Object literal may only specify known properties, and 'validationSchema' does not exist in type 'Partial<{ mode: keyof ValidationMode; reValidateMode: "onBlur" | "onChange" | "onSubmit"; defaultValues: { [x: string]: any; }; resolver: Resolver<FieldValues, object>; context: object; shouldFocusError: boolean; shouldUnregister: boolean; criteriaMode: CriteriaMode; }>'.ts(2345)
(property) validationSchema: ObjectSchema<Assign<ObjectShape, {
email: RequiredStringSchema<string | undefined, Record<string, any>>;
password: RequiredStringSchema<string | undefined, Record<string, any>>;
}>, Record<...>, TypeOfShape<...>, AssertsShape<...>>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.