Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
73 lines (57 sloc) 2.17 KB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Validation Test</title>
<script src="lib/jquery-1.3.2.js" type="text/javascript"></script>
<script src="lib/jquery.form.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(function() {
jQuery('#signup-form').ajaxForm(
{
dataType: 'json',
success: function(data) {
if (data.validation_failed) {
Vanadium.decorate(data.validation_failed);
}
return false;
}
}
)
})
</script>
<script src='dist/vanadium.js' type='text/javascript'></script>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class=":container">
<form id="signup-form" action="/test_submit.json" name="f" method="get" class=":container">
<div id="messages">
<div id="global-advice" style="display:none"></div>
</div>
<div id="email_and_name" class=":container">
<label class="desc" for="email">email: </label>
<input name="email" id="email" type="text"
class="field text large :only_on_blur :required;;email_advice :email;;email_advice">
<span id="email_advice"
style="display:none">Please enter a valid email address. For example fred@domain.com .</span>
<br/>
<label class="desc" for="name">name: </label>
<input name="name" id="name" class=":required :alpha :wait;500 :min_length;5 :ajax;/user_exists.json" type="text">
<br/>
</div>
<div id="passwords" class=":container">
<label class="desc" for="pass">password: </label>
<input name="password" id="pass" type="password" class=":required :min_length;5 :wait;100">
<span class="vanadium-valid-advice" style="display:none">OK</span>
<br/>
<label class="desc" for="repeat_pass">repeat password: </label>
<input name="repeat_password" id="repeat_pass" type="password"
class=":required :advice;global-advice :min_length;5 :same_as;pass :wait;100">
<br/>
</div>
<input type="submit" value="submit"/>
</form>
</div>
</body>
</html>