update client side validation
This commit is contained in:
1 parent
d38b51e1ca
commit
7da391fcb8
2 files changed
+6
-45
No files matched your search
@@ -1,40 +0,0 @@
|
||||
import { createContext, React } from "react";
|
||||
|
||||
const StatusFormContext = createContext({
|
||||
form: {},
|
||||
setForm: () => {},
|
||||
errors: {},
|
||||
setErrors: () => {},
|
||||
handleBlur: () => {},
|
||||
handleChange: () => {},
|
||||
handelCheckboxChange: () =>{}
|
||||
});
|
||||
|
||||
const StatusFormProvider = ({
|
||||
form,
|
||||
setForm,
|
||||
errors,
|
||||
setErrors,
|
||||
handleBlur,
|
||||
handleChange,
|
||||
handelCheckboxChange,
|
||||
children,
|
||||
}) => {
|
||||
return (
|
||||
<StatusFormContext.Provider
|
||||
value={{
|
||||
form,
|
||||
setForm,
|
||||
errors,
|
||||
setErrors,
|
||||
handleBlur,
|
||||
handleChange,
|
||||
handelCheckboxChange,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</StatusFormContext.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
export { StatusFormContext, StatusFormProvider };
|
||||
Reference in new issue
Block a user