как прикрутьть к JQuery маску

Статус
В этой теме нельзя размещать новые ответы.

1Dreamweaver1

Профессор
Регистрация
4 Янв 2008
Сообщения
417
Реакции
45
как прикрутьть к JQuery маску
Код:
$("#phone").mask("999-999-9999");


Код:
<script type="text/javascript">
<!--

	$().ready(function() {
 		$("#register").validate({
			event: "keyup",
 			rules: {
				screenname: { 
					required: true,
					minLength: 3
				},
				email: {
					required: true,
					email:true
				},
				password: {
					required: true,
					minLength: 5
				},
				confirm_password: {
					required: true,
					minLength: 5,
					equalTo: "#password"
				},
				zip_code: {
					required:true,
					digits:true,
					maxLength:5,
					minLength:5
				},
				topic: {
					required: "#newsletter:checked",
					minLength: 2
				},
				agree: { required: true	}
			},
 
 
			messages: {
				screenname: {
					required: "Please enter a screen name.",
					minLength: "Your screenname has to be longer than 3 characters."
				},
				email: {
					required: "Please enter an e-mail address"
				},
				password: {
					required: "Please provide a password",
					minLength: "Your password must contain at least six alphanumeric characters"
				},
				confirm_password: {
					required: "Please provide a password",
					minLength: "Your password must contain at least six alphanumeric characters",
					equalTo: "Please enter the same password as above"
				},
				zip_code: {
					required:"Please enter a zip code",
					digits:"Please enter only digits in the zip code field",
					maxLength:"Your zip code must be 5 digits",
					minLength:"Please enter at least 5 digits"
				},
				agree: "Please accept our policy"
			}
		});
		
	});
 
// -->
</script>
 
Статус
В этой теме нельзя размещать новые ответы.
Назад
Сверху