conditionallyrequired.js
来自「javascript 很酷的类库」· JavaScript 代码 · 共 31 行
JS
31 行
isc.DynamicForm.create({ ID: "exampleForm", width: 250, titleOrientation: "top", fields: [ {name: "willAttend", type: "radioGroup", colSpan: "*", required: true, vertical: false, valueMap: ["Yes", "No"], redrawOnChange:true, title: "Will you be attending the meeting on April 4th? If no, please provide a reason" }, {name: "reason", type: "text", title: "Reason", validators : [{ type: "requiredIf", expression: "exampleForm.getValue('willAttend') == 'No'", errorMessage: "Please provide a reason" }] }, {name: "validate", title: "Validate", type: "button", click: "form.validate()" } ]});
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?