简体   繁体   中英

Parsley.js - Password Validation doesnt submit

i have a problem with parsley.js. every time i hit the submit button it doesnt do anything. does anyone know a solution for this?

<!DOCTYPE html>
<html>

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Registrierung</title>

<link href="bootstrap-combined.min.css" rel="stylesheet"/>   
<script src="js/jquery-2.0.3.min.js"></script>
<script src="js/bootstrap-3.0.3.min.js"></script>
<script src="js/parsley.min.js"></script>
<script src="js/parsley.messages.de.js"></script>

</head>
<body class="body">

<?php
$fpw="";
?>
<div class="container">
<div class="offset4">
<div>
<h1>Registrierung</h1>
<?php if($fpw == true) echo '<div class="error" Passwörter stimmen nicht überein!<br></div>'; ?>
<form method="post" action="aregistrierung.php" data-validate="parsley">

<label for="passwort1" class="labbel">Passwort</label>
<input id="passwort1" name="passwort1" type="password" data-type="password" data-required="true" placeholder="Passwort" />

<label for="passwort2" class="labbel">Passwort bestätigen</label>
<input id="passwort2" name="passwort2" type="password" data-type="password" data-required="true" placeholder="Passwort" data-equalto="#passwort1" data-equalto-message="Passwort stimmt nicht überein"/>

<br><br>
<input name="registrieren" type="submit" value="Registrieren" class="btn btn-large btn-success"/>

</form>
</div>
</div>
</div>

</body>
</html>

i edited the whole file into it; i have tested it with a fake link like "sadfgkfe.php" too, it doesnt gave me the "not found" error.

尝试用parsley-validate替换表单属性data-validate =“parsley”,并用required替换data-required =“true”。

As @Doodlebot said, use parsley-validate on the form.

Remove data-type="password" - parsley has no password validation.

Change the data- prefix to parsley- .

Here is a sample fiddle .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM