Ensure verification password before submit register form
This commit is contained in:
@@ -11,6 +11,12 @@ export default function RegistrationForm() {
|
||||
const [isOpen, setIsOpen] = useState(false)
|
||||
|
||||
const handleFormSubmit = async data => {
|
||||
if (data.password_verification && data.password_verification !== data.password) {
|
||||
setError('Les mots de passe ne correspondent pas !')
|
||||
setIsOpen(true)
|
||||
return
|
||||
}
|
||||
|
||||
const response = await fetch('/api/auth/register', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user