Created
January 13, 2021 16:09
-
-
Save StevenCreates/5624ebe0504aee60ccbebec4d9e34b97 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect } from "react"; | |
export const usePasswordValidation = ({ firstPassword = "", secondPassword = "" }) => { | |
const [validLength, setValidLength] = useState(null); | |
const [hasNumber, setHasNumber] = useState(null); | |
const [upperCase, setUpperCase] = useState(null); | |
const [lowerCase, setLowerCase] = useState(null); | |
const [specialChar, setSpecialChar] = useState(null); | |
const [match, setMatch] = useState(null); | |
useEffect(() => { | |
}, [firstPassword, secondPassword]); | |
} | |
return [validLength, hasNumber, upperCase, lowerCase, match, specialChar]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hello
Sorry, where can i write it?