Skip to content

Instantly share code, notes, and snippets.

@aL3xa
Last active December 17, 2015 17:49
Show Gist options
  • Save aL3xa/5648932 to your computer and use it in GitHub Desktop.
Save aL3xa/5648932 to your computer and use it in GitHub Desktop.
<html>
<head>
<title></title>
<script type="text/javascript" src="http://cdn.rapporter.net/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/home/al3xa/packages/javascript/Parsley.js/parsley.js"></script>
</head>
<body>
<form method="GET" id="my_form">
<label for="name">Name</label>
<input type="text" id="name" name="name" value="" data-required="true" />
<br />
<label for="email">Email</label>
<input type="text" id="email" name="email" value="" data-required="true" data-type="email" />
<br />
<input type="submit" value="Submit" />
</form>
<script type="text/javascript">
$('#my_form').submit(function(evt){
var $form = $(this);
return $form.parsley('validate');
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment