|
||
|
|
||
|
JUVI 2.x supports Real Time Validation!
PayPalWhat is JUVI?Code DocumentsWorking ExampleFeedback
What is JUVI?
JUVI (jQuery User Validate Input) is a jQuery plugin, written for the purpose of easily,
implementable user input validation code on Javascript level through the jQuery API
After struggling for a long time to get a jQuery user input validation plugin which is easy to implement, customizable and easy to control, we decided to write our own. It works so well, that it seemed to be a good idea to make it available to the world As with any software, there is always room for improvement, thus we have made the Feedback section available for people to tell us what they think, and what can be improved. Based on this, we will release new versions and keep the old ones on archive We hope that this plugin makes user input validation problems a thing of the past, and works so well that it becomes an asset to developers on the same level as jQuery itself
JUVI Documentation
JUVI is designed to be easily implementable, customizable, fast and user-friendly
when validating user input
These are a few highlighted attributes
Input field validation parametersAll _juvi... field properties are part of the validator plugin. This enables ease of readability and usage Available parameters for use when assigning a form to JUVI for validationUsage Example: $("#frm").validateForm({formSubmitTrigger: "send-enquiry"});
Available parameters for use in fields
A simple validation example<html> <head>
<title>jQuery User Validate Input (JUVI) Example - 1.2</title>
<!-- Include the required jQuery version and the validator script -->
<script src="jquery_1.7.2_min.js" type="text/javascript"></script>
<script src="juvi_1.2_min.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
$(document).ready(function(){
//Attach form to validator within Try/Catch
try {
//Attach the form to an input validator
$("#frm").validateForm({formSubmitTrigger: "send-enquiry"});
} catch(e) {
alert(e);
}
//Check if the button is clicked to send an enquiry
$("#send-enquiry").click (function(event){
//Check if the form validated
if ($("#frm").validateForm("isValid")){
alert("Yay! The form is valid...");
}
});
});
//-->
</script>
</head>
<body>
<form name="frm" id="frm">
<h1>User input</h1>
<table cellpadding="5" cellspacing="5">
<tr>
<th>Name</th>
<!-- Setting only a min length means that the maximum can be anything but at least min must be satisfied -->
<td><input placeholder="Joe Peterson" _juvi_type="alpha" _juvi_min_length="3" id="name" type="text" size="30" name="name"/></td>
</tr>
<tr>
<th>Email</th>
<!-- General email authentication with the _juvi_type="email" property -->
<td><input placeholder="joe@somewhere.com" _juvi_type="email" id="email" type="text" size="30" name="email"/></td>
</tr>
<tr>
<th>IP (V6)</th>
<!-- Quickly validate an IPV6 address -->
<td><input placeholder="1050:0:0:0:5:600:300c:326b" _juvi_type="ipv6" id="ip6" type="text" size="30" name="ip6"/></td>
</tr>
<tr>
<th>Do you accept the Terms & Conditions?</th>
<!-- Quickly validate checkbox -->
<td><input _juvi_type="boolean" _juvi_required="true" id="terms" type="checkbox" name="terms"/></td>
</tr>
<tr>
<td colspan="2" align="right">
<!-- Using a type button instead of submit gives much more flexibility and control. This is your trigger upon which to validate user input -->
<input class="button" type="button" id="send-enquiry" name="send" value="Send Enquiry"></input>
</td>
</tr>
</table>
</form>
</body>
</html>
JUVI Example
JUVI Donators
No donators yet. Claim your space here by making a donation! |
||
|
|
||