flymis/WebRoot/dojojs/src/widget/ValidationTextbox.js
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
Copyright (c) 2004-2006, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.widget.ValidationTextbox");
dojo.require("dojo.widget.Textbox");
dojo.require("dojo.i18n.common");
/*
****** ValidationTextbox ******
A subclass of Textbox.
Over-ride isValid in subclasses to perform specific kinds of validation.
Has several new properties that can be specified as attributes in the markup.
@attr type Basic input tag type declaration.
@attr size Basic input tag size declaration.
@attr type Basic input tag maxlength declaration.
@attr required Can be true or false, default is false.
@attr validColor The color textbox is highlighted for valid input. Default is #cfc.
@attr invalidColor The color textbox is highlighted for invalid input. Default is #fcc.
@attr invalidClass Class used to format displayed text in page if necessary to override default class
@attr invalidMessage The message to display if value is invalid.
@attr missingMessage The message to display if value is missing.
@attr missingClass Override default class used for missing input data
@attr listenOnKeyPress Updates messages on each key press. Default is true.
@attr promptMessage Will not issue invalid message if field is populated with default user-prompt text
*/
dojo.widget.defineWidget(
"dojo.widget.ValidationTextbox",
dojo.widget.Textbox,
function() {
// this property isn't a primitive and needs to be created on a per-item basis.
this.flags = {};
},
{
// default values for new subclass properties
required: false,
rangeClass: "range",
invalidClass: "invalid",
missingClass: "missing",
classPrefix: "dojoValidate",
size: "",
maxlength: "",
promptMessage: "",
invalidMessage: "",
missingMessage: "",
rangeMessage: "",
listenOnKeyPress: true,
htmlfloat: "none",
lastCheckedValue: null,
templatePath: dojo.uri.dojoUri("src/widget/templates/ValidationTextbox.html"),
后面还有 135 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。