-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
E.g. in the example file there it checks if the required field is set.
Taking this example file, how would the require for :requiredInput2 be added to the list of validations when validity is already configured. Would it be possible to add an 'add' command to allow adding of extra validations?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8>
<title>A simple HTML5 page layout</title>
<link rel="stylesheet" href="jquery.validity.css" />
</head>
<body>
<form action="">
<frameset>
<legend>The form</legend>
<label for="requiredInput">This input is required.</label>
<input type="text" id="requiredInput" />
<input type="text" id="requiredInput2" />
<input type="submit" />
</frameset>
</form>
<script src="jquery-1.10.2.min.js"></script>
<script src="jquery.validity.js"></script>
<script>
$("form").validity(function() {
$("#requiredInput").require();
});
$("#requiredInput2").require();
</script>
</body>
</html>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels