1.0.51 β’ Published 1 year ago
areyouverified
Licence
MIT
Version
1.0.51
Deps
6
Size
10 kB
Vulns
0
Weekly
0
AreYouVerified NPM Package
AreYouverified is a simple, lightweight hook to enhance your form security with verified verification.
Compatibility
The package is compatible with React. Support for additional frameworks will be added soonβstay tuned
Installation
Install the package via npm or yarn:
npm install areyouverified
# or
yarn add areyouverified
Usage
Import the hook:
import { useAreYouVerified } from "areyouverified";De-structure the returned values:
const { valid, AreYouverified } = useAreYouVerified();Integrate
AreYouVerifiedinto your form:const MyForm = () => { const { valid, AreYouverified } = useAreYouVerified(); const handleSubmit = () => { if (valid) { // Proceed with form submission console.log("Form is verified!"); } else { console.log("Please complete the verified verification."); } }; return ( <form onSubmit={(e) => { e.preventDefault(); handleSubmit(); }} > <AreYouverified theme="dark" customCss="validator" // Pass your CSS classes /> <button type="submit">Submit</button> </form> ); };
Features
AreYouVerified: A component to render the verification tool in your form.valid: A boolean indicating whether the verification was successful.
Try it Out
Visit AreYouVerified Demo and check the "Give it a try" section to explore how it works.