/* 
 *  This file is part of the LikePHP package.
 *  Abendas <abendas@163.com; rushairer@163.com>
 * 
 *  For the full copyright and license information, please view the LICENSE
 *  file that was distributed with this source code.
 */
var Photos = new Object();
Photos.registerInit = function(){

    $("#postform").validate({
        rules: {
            'user[nickname]': {
                required: true,
                minlength: 2
            },
            'user[shopname]': {
                required: true,
                minlength: 2
            },
            'user[realname]': {
                required: true,
                minlength: 2
            },
            'user[idcard]': {
                required: true,
                minlength: 2
            },
            'user[address]': {
                required: true,
                minlength: 5,
                maxlength:200
            },
            'user[postcode]': {
                required: true,
                minlength: 2
            },
            'user[phone]': {
                required: true,
                minlength: 5
            },
            'user[mobile]': {
                required: true,
                minlength: 5
            },
            'user[email]': {
                required: true,
                minlength: 2,
                email:true
            },
            'user[mname]': {
                required: true,
                minlength: 2
            },
            'user[maddress]': {
                required: true,
                minlength: 5,
                maxlength:200
            }
        },
        messages: {
            'user[nickname]': {
                required: '请输入你的昵称',
                minlength: '昵称不得小于两个字'
            },
            'user[shopname]': {
                required: '请输入你的店铺名称',
                minlength: '名称不得小于两个字'
            },
            'user[realname]': {
                required: '请输入你的真实姓名',
                minlength: '姓名不得小于两个字'
            },
            'user[idcard]': {
                required: '请输入你的身份证或其他证件号码',
                minlength: '请输入真实号码'
            },
            'user[address]': {
                required: '请输入你的有效通讯地址',
                minlength: '请输入你的有效通讯地址',
                maxlength:'不得多于200字'
            },
            'user[postcode]': {
                required: '请输入你的有效通讯地址邮编',
                minlength:  '请输入你的有效通讯地址邮编'
            },
            'user[phone]': {
                required: '请输入你的座机号码',
                minlength: '请输入正确的座机号码'
            },
            'user[mobile]': {
                required: '请输入你的手机号码',
                minlength: '请输入正确的手机号码'
            },
            'user[email]': {
                required: '请输入你常用的Email地址',
                minlength: '太短了',
                email:'请输入正确的Email格式'
            },
            'user[mname]': {
                required: '请输入收款人真实姓名',
                minlength: '姓名不得少于两个字'
            },
            'user[maddress]': {
                required: '请输入你的有效通讯地址',
                minlength: '请输入你的有效通讯地址',
                maxlength:'不得多于200字'
            }
        }
        
    });
}