UNPKG

react-tailwind-form-validator

Version:

A lightweight and customizable React form validation library built with Tailwind CSS for modern, responsive, and accessible forms.

9 lines (8 loc) 289 B
import { useContext } from 'react'; import { FormContext } from '../context/FormContext'; export const useFormData = () => { const context = useContext(FormContext); if (!context) throw new Error('useInputData must be used within an InputProvider'); return context; };