I'm using the Jquery Validation Plugin on my site, and I have a
textfield that validates to only allow numbers. However, that also
doesn't allow linebreaks - which I need to have! Is there a way around
this?

Here's the working code:


<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js";></script>
<script type="text/javascript" src="http://dev.jquery.com/view/trunk/
plugins/validate/jquery.validate.js"></script>
<script>
$(document).ready(function() { // Doc Ready Functions

$("#quicksend_form").validate({
        rules: {
                recepients: {
                  required: true,
                  digits: true,
                  minlength: 10
                }
        }
});

}); // Doc Ready Functions
</script>

</head>

<body>

<form action="#" method="post" enctype="multipart/form-data"
name="quicksend_form" id="quicksend_form">
<textarea name="recepients" id="recepients" rows="20"></textarea>
<input type="submit" name="button" id="button" value="Submit" />
</form>

</body
</html>

Reply via email to