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

Тема в разделе "Другие языки", создана пользователем 1Dreamweaver1, 3 июл 2008.

Статус темы:
Закрыта.
Модераторы: Цукер
  1. 1Dreamweaver1

    1Dreamweaver1

    Регистр.:
    5 янв 2008
    Сообщения:
    417
    Симпатии:
    44
    как прикрутьть к 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>
     
Статус темы:
Закрыта.