天翎MyApps技术社区 - 低代码平台 | 流程管理系统 | BPM软件

 找回密码
 注册成为天翎用户
查看: 2116|回复: 0

[函数] 校验不能为空【函数-checkNumeric (fieldName,description)】

[复制链接]
purple 发表于 2011-11-29 10:46:36 | 显示全部楼层 |阅读模式
本帖最后由 purple 于 2012-12-31 14:11 编辑

函数格式:
checkNumeric (fieldName,description)
函数说明:
fieldName: 字段名
description : 描述
示例:
实现checkEmpty (fieldName,description)函数的应用
function checkEmpty(fieldName,description) {
        var doc = $CURRDOC.getCurrDoc();
        var value = doc.getItemValueAsString(fieldName);
        var returnStr = "";
        if(value==null || value.trim().length()<=0) {
          returnStr = "'"+description+"'必需填写!";
        }
        return returnStr;
}
QQ截图20120227155212.jpg
调用
#include " validationlib";
checkEmpty ("fieldName","description");
QQ截图20120227155121.jpg

本版积分规则

QQ|手机版|天翎MyApps技术社区 ( 粤ICP备11093750号 )

GMT+8, 2026-8-12 07:38

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表