public/static/js/admin/formplus.js

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/**
 * 人人站CMS
 * ============================================================================
 * 版权所有 2015-2030 山东康程信息科技有限公司,并保留所有权利。
 * 网站地址: http://www.rrzcms.com
 * ----------------------------------------------------------------------------
 * 如果商业用途务必到官方购买正版授权, 以免引起不必要的法律纠纷.
 * ============================================================================
 */
var LANG_formplus = {
    validate: {
        required: '本项必填',
        minLength: '输入不正确,至少{minLength}个字符(已输入{length}个)',
        maxLength: '输入不正确,最多{maxLength}个字符(已输入{length}个)',
        unsignedint: '请填写正整数',
        number: '请填写数值',
        digits: '请填写整数',
        unsigned: '请填写大于等于0的数值',
        positive: '请输入大于0的数值',
        alpha: '请填写英文字母',
        alphaint: '请填写英文字母或者数字',
        alphanum: '请填写英文字母、中文及数字',
        date: '请填写日期,格式yyyy-mm-dd',
        email: '请填写正确的email地址',
        mobile: '请填写正确的手机号码',
        tel: '请填写正确的固定电话',
        phone: '请填写正确的电话或手机',
        zip: '请填写正确的邮编',
        url: '请填写正确的网址'
    }
};
//==扩展js方法
// 替换字符串中的字段
String.prototype.substitute = function (object, regexp) {
    return String(this).replace(regexp || (/\\?\{([^{}]+)\}/g), function (match, name) {
        if (match.charAt(0) == '\\') return match.slice(1);
        return (object[name] != null) ? object[name] : ((name.indexOf(':') != -1) ? '{' + name + '}' : '');
    });
};
String.prototype.test = function (regex, params) {
    return (($.type(regex) == 'regexp') ? regex : new RegExp('' + regex, params)).test(this);
};
//=基本表单验证
var validatorMap = {
    'required': [LANG_formplus['validate']['required'], function (element, v, type) {
        if (type == 'select-one' || type == 'select') {
            var index = element.selectedIndex;
            v = element.options[index].value;
            return index >= 0 && (v != '' && v != '_NULL_');
        }
        return v !== null && v.length !== 0;
    }],
    'minLength': [function (element, v, props) {
        if (props != 'null') {
            return LANG_formplus['validate']['minLength'].substitute({ minLength: props, length: v.length });
        }
        return '';
    }, function (element, v, type, props) {
        if (props != 'null') return v.length >= (props || 0);
        return true;

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。