- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我试图让我的项目尽可能没有错误,但我所有的 phtml 文件都包含 <nav>
, <aside>
, <article>
和其他 HTML5 标签会导致错误。如何配置验证器以识别这些新元素?
已尝试向此处的源请求支持
http://forums.zend.com/viewtopic.php?f=59&t=10463
目前没有答案
最佳答案
使用 HTML5 DTD来自 Komodo,它是 XHTML DTD 的扩展,作为 Eclipse XML Catalog 中的新映射.
<!--
HTML 5 DTD
This is the same as HTML 4 Transitional except for
updates for the HTML 5 specication.
-->
<!--================ Character mnemonic entities =========================-->
<!ENTITY % HTMLlat1 PUBLIC
"-//W3C//ENTITIES Latin 1 for XHTML//EN"
"html5-lat1.ent">
%HTMLlat1;
<!ENTITY % HTMLsymbol PUBLIC
"-//W3C//ENTITIES Symbols for XHTML//EN"
"html5-symbol.ent">
%HTMLsymbol;
<!ENTITY % HTMLspecial PUBLIC
"-//W3C//ENTITIES Special for XHTML//EN"
"html5-special.ent">
%HTMLspecial;
<!--================== Imported Names ====================================-->
<!ENTITY % ContentType "CDATA">
<!-- media type, as per [RFC2045] -->
<!ENTITY % ContentTypes "CDATA">
<!-- comma-separated list of media types, as per [RFC2045] -->
<!ENTITY % Charset "CDATA">
<!-- a character encoding, as per [RFC2045] -->
<!ENTITY % Charsets "CDATA">
<!-- a space separated list of character encodings, as per [RFC2045] -->
<!ENTITY % LanguageCode "NMTOKEN">
<!-- a language code, as per [RFC3066] -->
<!ENTITY % Character "CDATA">
<!-- a single character, as per section 2.2 of [XML] -->
<!ENTITY % Number "CDATA">
<!-- one or more digits -->
<!ENTITY % Date "CDATA">
<!-- one or more digits -->
<!ENTITY % LinkTypes "(alternate | archives | author | bookmark | contact | external | first | help | icon | index | last | license | next | nofollow | noreferrer | pingback | prefetch | prev | search | stylesheet | sidebar | tag | up)">
<!-- space-separated list of link types -->
<!ENTITY % MediaDesc "(all|braille|embossed|handheld|print|projection|screen|speech|tty|tv)">
<!-- single or comma-separated list of media descriptors -->
<!ENTITY % URI "CDATA">
<!-- a Uniform Resource Identifier, see [RFC2396] -->
<!ENTITY % UriList "CDATA">
<!-- a space separated list of Uniform Resource Identifiers -->
<!ENTITY % Datetime "CDATA">
<!-- date and time information. ISO date format -->
<!ENTITY % Script "CDATA">
<!-- script expression -->
<!ENTITY % StyleSheet "CDATA">
<!-- style sheet data -->
<!ENTITY % Text "CDATA">
<!-- used for titles etc. -->
<!ENTITY % FrameTarget "(_blank | _parent | _self | _top)">
<!-- render in this frame -->
<!ENTITY % Length "CDATA">
<!-- nn for pixels or nn% for percentage length -->
<!ENTITY % MultiLength "CDATA">
<!-- pixel, percentage, or relative -->
<!ENTITY % Pixels "CDATA">
<!-- integer representing length in pixels -->
<!ENTITY % Boolean "(true|false)">
<!-- these are used for image maps -->
<!ENTITY % Shape "(rect|circle|poly|default)">
<!ENTITY % Coords "CDATA">
<!-- comma separated list of lengths -->
<!-- a color using sRGB: #RRGGBB as Hex values -->
<!ENTITY % Color "CDATA">
<!-- There are also 16 widely known color names with their sRGB values:
Black = #000000 Green = #008000
Silver = #C0C0C0 Lime = #00FF00
Gray = #808080 Olive = #808000
White = #FFFFFF Yellow = #FFFF00
Maroon = #800000 Navy = #000080
Red = #FF0000 Blue = #0000FF
Purple = #800080 Teal = #008080
Fuchsia= #FF00FF Aqua = #00FFFF
-->
<!--=================== Generic Attributes ===============================-->
<!-- core attributes common to most elements
id document-wide unique id
class space separated list of classes
style associated style info
title advisory title/amplification
-->
<!ENTITY % coreattrs
"id ID #IMPLIED
class CDATA #IMPLIED
style %StyleSheet; #IMPLIED
title %Text; #IMPLIED"
>
<!-- internationalization attributes
lang language code (backwards compatible)
xml:lang language code (as per XML 1.0 spec)
dir direction for weak/neutral text
-->
<!ENTITY % i18n
"lang %LanguageCode; #IMPLIED
xml:lang %LanguageCode; #IMPLIED
dir (ltr|rtl) #IMPLIED"
>
<!-- attributes for common UI events
onclick a pointer button was clicked
ondblclick a pointer button was double clicked
onmousedown a pointer button was pressed down
onmouseup a pointer button was released
onmousemove a pointer was moved onto the element
onmouseout a pointer was moved away from the element
onkeypress a key was pressed and released
onkeydown a key was pressed down
onkeyup a key was released
-->
<!ENTITY % events
"onclick %Script; #IMPLIED
ondblclick %Script; #IMPLIED
onmousedown %Script; #IMPLIED
onmouseup %Script; #IMPLIED
onmouseover %Script; #IMPLIED
onmousemove %Script; #IMPLIED
onmouseout %Script; #IMPLIED
onkeypress %Script; #IMPLIED
onkeydown %Script; #IMPLIED
onkeyup %Script; #IMPLIED
<!-- HTML 5 Mouse Events - Events triggered by a mouse, or similar user actions: -->
ondrag %Script; #IMPLIED <!-- Script to be run when an element is dragged -->
ondragend %Script; #IMPLIED <!-- Script to be run at the end of a drag operation -->
ondragenter %Script; #IMPLIED <!-- Script to be run when an element has been dragged to a valid drop target -->
ondragleave %Script; #IMPLIED <!-- Script to be run when an element leaves a valid drop target -->
ondragover %Script; #IMPLIED <!-- Script to be run when an element is being dragged over a valid drop target -->
ondragstart %Script; #IMPLIED <!-- Script to be run at the start of a drag operation -->
ondrop %Script; #IMPLIED <!-- Script to be run when dragged element is being dropped -->
onmousewheel %Script; #IMPLIED <!-- Script to be run when the mouse wheel is being rotated -->
onscroll %Script; #IMPLIED <!-- Script to be run when an element's scrollbar is being scrolled -->
"
>
<!-- attributes for elements that can get the focus
accesskey accessibility key character
tabindex position in tabbing order
onfocus the element got the focus
onblur the element lost the focus
-->
<!ENTITY % focus
"accesskey %Character; #IMPLIED
tabindex %Number; #IMPLIED
onfocus %Script; #IMPLIED
onblur %Script; #IMPLIED"
>
<!-- HTML 5 core attributes -->
<!ENTITY % html5attrs
"contenteditable %Boolean; #IMPLIED
contextmenu ID #IMPLIED
draggable (true | false | auto) #IMPLIED
hidden (hidden) #IMPLIED
item CDATA #IMPLIED
itemprop CDATA #IMPLIED
spellcheck %Boolean; #IMPLIED
subject ID #IMPLIED
contextmenu ID #IMPLIED
contextmenu ID #IMPLIED
contextmenu ID #IMPLIED
contextmenu ID #IMPLIED
"
>
<!-- Media Events - Events triggered by medias like videos, images and audio.
Applies to all HTML 5 elements, but is most common in media elements, such
as audio, embed, img, object, and video. -->
<!ENTITY % html5mediaevents
"onabort %Script; #IMPLIED <!-- Script to be run on an abort event -->
oncanplay %Script; #IMPLIED <!-- Script to be run when media can start play, but might has to stop for buffering -->
oncanplaythrough %Script; #IMPLIED <!-- Script to be run when media can be played to the end, without stopping for buffering -->
ondurationchange %Script; #IMPLIED <!-- Script to be run when the length of the media is changed -->
onemptied %Script; #IMPLIED <!-- Script to be run when a media resource element suddenly becomes empty (network errors, errors on load etc.) -->
onended %Script; #IMPLIED <!-- Script to be run when media has reach the end -->
onerror %Script; #IMPLIED <!-- Script to be run when an error occurs during the loading of an element -->
onloadeddata %Script; #IMPLIED <!-- Script to be run when media data is loaded -->
onloadedmetadata %Script; #IMPLIED <!-- Script to be run when the duration and other media data of a media element is loaded -->
onloadstart %Script; #IMPLIED <!-- Script to be run when the browser starts to load the media data -->
onpause %Script; #IMPLIED <!-- Script to be run when media data is paused -->
onplay %Script; #IMPLIED <!-- Script to be run when media data is going to start playing -->
onplaying %Script; #IMPLIED <!-- Script to be run when media data has start playing -->
onprogress %Script; #IMPLIED <!-- Script to be run when the browser is fetching the media data -->
onratechange %Script; #IMPLIED <!-- Script to be run when the media data's playing rate has changed -->
onreadystatechange %Script; #IMPLIED <!-- Script to be run when the ready-state changes -->
onseeked %Script; #IMPLIED <!-- Script to be run when a media element's seeking attribute is no longer true, and the seeking has ended -->
onseeking %Script; #IMPLIED <!-- Script to be run when a media element's seeking attribute is true, and the seeking has begun -->
onstalled %Script; #IMPLIED <!-- Script to be run when there is an error in fetching media data (stalled) -->
onsuspend %Script; #IMPLIED <!-- Script to be run when the browser has been fetching media data, but stopped before the entire media file was fetched -->
ontimeupdate %Script; #IMPLIED <!-- Script to be run when media changes its playing position -->
onvolumechange %Script; #IMPLIED <!-- Script to be run when media changes the volume, also when volume is set to "mute" -->
onwaiting %Script; #IMPLIED <!-- Script to be run when media has stopped playing, but is expected to resume -->
"
>
<!ENTITY % attrs "%coreattrs; %i18n; %events; %html5attrs;">
<!--=================== Text Elements ====================================-->
<!ENTITY % special.extra
"object | img | map | iframe">
<!ENTITY % special.basic
"br | span | bdo">
<!ENTITY % special
"%special.basic; | %special.extra;">
<!ENTITY % fontstyle.basic "small | i | b | u">
<!ENTITY % fontstyle "%fontstyle.basic;">
<!ENTITY % phrase.extra "sub | sup">
<!ENTITY % phrase.basic "em | strong | dfn | code | q |
samp | kbd | var | cite | abbr | acronym">
<!ENTITY % phrase "%phrase.basic; | %phrase.extra;">
<!ENTITY % inline.forms "input | output | select | textarea | label | button |
datetime | datetime-local | data | month | week |
time | number | range | email | url | menu |
datalist">
<!-- these can occur at block or inline level -->
<!ENTITY % misc.inline "ins | del | script">
<!-- these can only occur at block level -->
<!ENTITY % misc "noscript | %misc.inline;">
<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
<!-- %Inline; covers inline or "text-level" elements -->
<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">
<!--================== Block level elements ==============================-->
<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
<!ENTITY % lists "ul | ol | dl">
<!ENTITY % blocktext "pre | hr | blockquote | address | article | aside |
summary | mark">
<!ENTITY % block
"p | %heading; | div | %lists; | %blocktext; | fieldset | table |
header | footer | section | hgroup | main | nav | dialog | figure |
datagrid | canvas | audio | video | source | embed | keygen |
progress | ruby">
<!-- %Flow; mixes block and inline and is used for list items etc. -->
<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
<!--================== Content models for exclusions =====================-->
<!-- a elements use %Inline; excluding a -->
<!ENTITY % a.content
"(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">
<!-- pre uses %Inline excluding img, object, big, small -->
<!ENTITY % pre.content
"(#PCDATA | a | %special.basic; | %fontstyle.basic; | %phrase.basic; |
%inline.forms; | %misc.inline;)*">
<!-- form uses %Flow; excluding form -->
<!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*">
<!-- button uses %Flow; but excludes a, form, form controls, iframe -->
<!ENTITY % button.content
"(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
table | datagrid | br | span | bdo | object | img | map |
%fontstyle; | %phrase; | %misc;)*">
<!--================ Document Structure ==================================-->
<!-- the namespace URI designates the document profile -->
<!ELEMENT html (head, body)>
<!ATTLIST html
%i18n;
id ID #IMPLIED
xmlns %URI; #FIXED 'http://www.w3.org/1999/xhtml'
<!-- HTML 5 attributes -->
manifest %URI; #IMPLIED
>
<!--================ Document Head =======================================-->
<!ENTITY % head.misc "(script|style|meta|link|object)*">
<!-- content model is %head.misc; combined with a single
title and an optional base element in any order -->
<!ELEMENT head (%head.misc;,
((title, %head.misc;, (base, %head.misc;)?) |
(base, %head.misc;, (title, %head.misc;))))>
<!ATTLIST head
%i18n;
id ID #IMPLIED
profile %URI; #IMPLIED
>
<!-- The title element is not considered part of the flow of text.
It should be displayed, for example as the page header or
window title. Exactly one title is required per document.
-->
<!ELEMENT title (#PCDATA)>
<!ATTLIST title
%i18n;
id ID #IMPLIED
>
<!-- document base URI -->
<!ELEMENT base EMPTY>
<!ATTLIST base
id ID #IMPLIED
href %URI; #IMPLIED
target %FrameTarget; #IMPLIED
>
<!-- generic metainformation -->
<!ELEMENT meta EMPTY>
<!ATTLIST meta
%i18n;
id ID #IMPLIED
http-equiv CDATA #IMPLIED
name CDATA #IMPLIED
content CDATA #REQUIRED
<!-- HTML 5 attributes -->
charset %Charset; #IMPLIED
>
<!--
Relationship values can be used in principle:
a) for document specific toolbars/menus when used
with the link element in document head e.g.
start, contents, previous, next, index, end, help
b) to link to a separate style sheet (rel="stylesheet")
c) to make a link to a script (rel="script")
d) by stylesheets to control how collections of
html nodes are rendered into printed documents
e) to make a link to a printable version of this document
e.g. a PostScript or PDF version (rel="alternate" media="print")
-->
<!ELEMENT link EMPTY>
<!ATTLIST link
%attrs;
href %URI; #IMPLIED
hreflang %LanguageCode; #IMPLIED
type %ContentType; #IMPLIED
rel %LinkTypes; #IMPLIED
media %MediaDesc; #IMPLIED
<!-- HTML 5 attributes -->
sizes %Number; #IMPLIED
>
<!-- style info, which may include CDATA sections -->
<!ELEMENT style (#PCDATA)>
<!ATTLIST style
%i18n;
id ID #IMPLIED
type (text/css) #REQUIRED
media %MediaDesc; #IMPLIED
<!-- HTML 5 attributes -->
scoped (scoped) #IMPLIED
>
<!-- script statements, which may include CDATA sections -->
<!ELEMENT script (#PCDATA)>
<!ATTLIST script
id ID #IMPLIED
charset %Charset; #IMPLIED
type (text/javascript) #REQUIRED
language CDATA #IMPLIED
src %URI; #IMPLIED
defer (defer) #IMPLIED
<!-- HTML 5 attributes -->
async (async) #IMPLIED
>
<!-- alternate content container for non script-based rendering -->
<!ELEMENT noscript %Flow;>
<!ATTLIST noscript
%attrs;
>
<!--======================= Frames =======================================-->
<!-- inline subwindow -->
<!ELEMENT iframe %Flow;>
<!ATTLIST iframe
%coreattrs;
%html5attrs;
name NMTOKEN #IMPLIED
src %URI; #IMPLIED
height %Length; #IMPLIED
width %Length; #IMPLIED
<!-- HTML 5 attributes -->
sandbox (allow-forms | allow-same-origin | allow-scripts) #IMPLIED
seamless CDATA #IMPLIED
srcdoc CDATA #IMPLIED
>
<!--=================== Document Body ====================================-->
<!ELEMENT body %Flow;>
<!ATTLIST body
%attrs;
onload %Script; #IMPLIED
onunload %Script; #IMPLIED
<!-- HTML 5 Window Event Attributes -->
onafterprint %Script; #IMPLIED <!-- Script to be run after the document is printed -->
onbeforeprint %Script; #IMPLIED <!-- Script to be run before the document is printed -->
onbeforeonload %Script; #IMPLIED <!-- Script to be run before the document loads -->
onerror %Script; #IMPLIED <!-- Script to be run when an error occur -->
onhaschange %Script; #IMPLIED <!-- Script to be run when the document has change -->
onmessage %Script; #IMPLIED <!-- Script to be run when the message is triggered -->
onoffline %Script; #IMPLIED <!-- Script to be run when the document goes offline -->
ononline %Script; #IMPLIED <!-- Script to be run when the document comes online -->
onpagehide %Script; #IMPLIED <!-- Script to be run when the window is hidden -->
onpageshow %Script; #IMPLIED <!-- Script to be run when the window becomes visible -->
onpopstate %Script; #IMPLIED <!-- Script to be run when the window's history changes -->
onredo %Script; #IMPLIED <!-- Script to be run when the document performs a redo -->
onresize %Script; #IMPLIED <!-- Script to be run when the window is resized -->
onstorage %Script; #IMPLIED <!-- Script to be run when a document loads -->
onundo %Script; #IMPLIED <!-- Script to be run when a document performs an undo -->
onunload %Script; #IMPLIED <!-- Script to be run when the user leaves the document -->
>
<!ELEMENT div %Flow;> <!-- generic language/style container -->
<!ATTLIST div
%attrs;
>
<!--=================== Paragraphs =======================================-->
<!ELEMENT p %Inline;>
<!ATTLIST p
%attrs;
>
<!--=================== Headings =========================================-->
<!--
There are six levels of headings from h1 (the most important)
to h6 (the least important).
-->
<!ELEMENT h1 %Inline;>
<!ATTLIST h1
%attrs;
>
<!ELEMENT h2 %Inline;>
<!ATTLIST h2
%attrs;
>
<!ELEMENT h3 %Inline;>
<!ATTLIST h3
%attrs;
>
<!ELEMENT h4 %Inline;>
<!ATTLIST h4
%attrs;
>
<!ELEMENT h5 %Inline;>
<!ATTLIST h5
%attrs;
>
<!ELEMENT h6 %Inline;>
<!ATTLIST h6
%attrs;
>
<!--=================== Lists ============================================-->
<!-- Unordered list -->
<!ELEMENT ul (li)+>
<!ATTLIST ul
%attrs;
>
<!-- Ordered (numbered) list -->
<!ELEMENT ol (li)+>
<!ATTLIST ol
%attrs;
start %Number; #IMPLIED
<!-- HTML 5 attributes -->
reversed (reversed) #IMPLIED
>
<!-- list item -->
<!ELEMENT li %Flow;>
<!ATTLIST li
%attrs;
value %Number; #IMPLIED
>
<!-- definition lists - dt for term, dd for its definition -->
<!ELEMENT dl (dt|dd)+>
<!ATTLIST dl
%attrs;
>
<!ELEMENT dt %Inline;>
<!ATTLIST dt
%attrs;
>
<!ELEMENT dd %Flow;>
<!ATTLIST dd
%attrs;
>
<!--=================== Address ==========================================-->
<!-- information on author -->
<!ELEMENT address (#PCDATA | %inline; | %misc.inline; | p)*>
<!ATTLIST address
%attrs;
>
<!--=================== Horizontal Rule ==================================-->
<!ELEMENT hr EMPTY>
<!ATTLIST hr
%attrs;
>
<!--=================== Preformatted Text ================================-->
<!-- content is %Inline; excluding
"img|object|small|sub|sup" -->
<!ELEMENT pre %pre.content;>
<!ATTLIST pre
%attrs;
>
<!--=================== Block-like Quotes ================================-->
<!ELEMENT blockquote %Flow;>
<!ATTLIST blockquote
%attrs;
cite %URI; #IMPLIED
>
<!--=================== Inserted/Deleted Text ============================-->
<!--
ins/del are allowed in block and inline content, but its
inappropriate to include block content within an ins element
occurring in inline content.
-->
<!ELEMENT ins %Flow;>
<!ATTLIST ins
%attrs;
cite %URI; #IMPLIED
datetime %Datetime; #IMPLIED
>
<!ELEMENT del %Flow;>
<!ATTLIST del
%attrs;
cite %URI; #IMPLIED
datetime %Datetime; #IMPLIED
>
<!--================== The Anchor Element ================================-->
<!-- content is %Inline; except that anchors shouldn't be nested -->
<!ELEMENT a %a.content;>
<!ATTLIST a
%attrs;
%focus;
href %URI; #IMPLIED
hreflang %LanguageCode; #IMPLIED
rel %LinkTypes; #IMPLIED
target %FrameTarget; #IMPLIED
<!-- HTML 5 attributes -->
media CDATA #IMPLIED
ping %URI; #IMPLIED
type %ContentType; #IMPLIED
>
<!--===================== Inline Elements ================================-->
<!ELEMENT span %Inline;> <!-- generic language/style container -->
<!ATTLIST span
%attrs;
>
<!ELEMENT bdo %Inline;> <!-- I18N BiDi over-ride -->
<!ATTLIST bdo
%coreattrs;
%html5attrs;
%events;
lang %LanguageCode; #IMPLIED
xml:lang %LanguageCode; #IMPLIED
dir (ltr|rtl) #REQUIRED
>
<!ELEMENT br EMPTY> <!-- forced line break -->
<!ATTLIST br
%coreattrs;
%html5attrs;
>
<!ELEMENT em %Inline;> <!-- emphasis -->
<!ATTLIST em %attrs;>
<!ELEMENT strong %Inline;> <!-- strong emphasis -->
<!ATTLIST strong %attrs;>
<!ELEMENT dfn %Inline;> <!-- definitional -->
<!ATTLIST dfn %attrs;>
<!ELEMENT code %Inline;> <!-- program code -->
<!ATTLIST code %attrs;>
<!ELEMENT samp %Inline;> <!-- sample -->
<!ATTLIST samp %attrs;>
<!ELEMENT kbd %Inline;> <!-- something user would type -->
<!ATTLIST kbd %attrs;>
<!ELEMENT var %Inline;> <!-- variable -->
<!ATTLIST var %attrs;>
<!ELEMENT cite %Inline;> <!-- citation -->
<!ATTLIST cite %attrs;>
<!ELEMENT abbr %Inline;> <!-- abbreviation -->
<!ATTLIST abbr %attrs;>
<!ELEMENT q %Inline;> <!-- inlined quote -->
<!ATTLIST q
%attrs;
cite %URI; #IMPLIED
>
<!ELEMENT sub %Inline;> <!-- subscript -->
<!ATTLIST sub %attrs;>
<!ELEMENT sup %Inline;> <!-- superscript -->
<!ATTLIST sup %attrs;>
<!ELEMENT i %Inline;> <!-- italic font -->
<!ATTLIST i %attrs;>
<!ELEMENT b %Inline;> <!-- bold font -->
<!ATTLIST b %attrs;>
<!ELEMENT small %Inline;> <!-- smaller font -->
<!ATTLIST small %attrs;>
<!--==================== Object ======================================-->
<!--
object is used to embed objects as part of HTML pages.
param elements should precede other content. Parameters
can also be expressed as attribute/value pairs on the
object element itself when brevity is desired.
-->
<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>
<!ATTLIST object
%attrs;
%html5mediaevents;
data %URI; #IMPLIED
type %ContentType; #IMPLIED
height %Length; #IMPLIED
width %Length; #IMPLIED
usemap %URI; #IMPLIED
name NMTOKEN #IMPLIED
tabindex %Number; #IMPLIED
<!-- HTML 5 attributes -->
form CDATA #IMPLIED
>
引用资料
关于eclipse - Zend Studio 的 HTML5 验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5038538/
在 JSF2 应用程序中遇到验证属性的问题时,有两种主要方法。 使用 Annotation 在 ManagedBean 上定义验证 @ManagedBean public class MyBean {
我想实现一个不常见的功能,我认为 jquery 验证插件将是最好的方法(如果您在没有插件的情况下建议和回答,我们也会欢迎)。我想在用户在输入字段中输入正确的单词后立即隐藏表单。我试过这个: $("
我有几个下拉菜单(类名为month_dropdown),并且下拉菜单的数量不是恒定的。我怎样才能为它们实现 NotEqual 验证。我正在使用 jQuery 验证插件。 这就是我写的 - jQuery
我设法制作了这个网址验证代码并且它起作用了。但我面临着一个问题。我认为 stackoverflow 是获得解决方案的最佳场所。 function url_followers(){ var url=do
我目前正在使用后端服务,该服务允许用户在客户端应用程序上使用 Google Games 库登录。 用户可以通过他们的 gplay ID 向我们发送信息,以便登录或恢复旧帐户。用户向我们发送以下内容,包
我正在尝试验证输入以查看它是否是有效的 IP 地址(可能是部分地址)。 可接受的输入:172、172.112、172.112.113、172.112.113.114 Not Acceptable 输入
我从 Mongoose 验证中得到这条消息: 'Validator failed for path phone with value ``' 这不应该发生,因为不需要电话。 这是我的模型架构: var
我一直在尝试使用Python-LDAP (版本 2.4.19)在 MacOS X 10.9.5 和 Python 2.7.9 下 我想在调用 .start_tls_s() 后验证与给定 LDAP 服务
我正在处理一个仅与 IE6 兼容的旧 javascript 项目(抱歉...),我想仅在 VS 2017 中禁用此项目的 ESLint/CSLint/Javascript 验证/CSS 验证。 我知道
我正在寻找一种方法来验证 Spring 命令 bean 中的 java.lang.Double 字段的最大值和最小值(一个值必须位于给定的值范围之间),例如, public final class W
我正在尝试在 springfuse(JavaEE 6 + Spring Framework (针对 Jetty、Tomcat、JBoss 等)) 和 maven 的帮助下构建我的 webapps 工作
我试图在我们的项目中使用 scalaz 验证,但遇到了以下情况: def rate(username: String, params: Map[String, String]): Validation
我有一个像这样的 Yaml 文件 name: hhh_aaa_bbb arguments: - !argument name: inputsss des
我有一个表单,人们可以单击并向表单添加字段,并且我需要让它在单击时验证这些字段中的值。 假设我单击它两次并获取 2 个独立的字段集,我需要旋转 % 以确保它在保存时等于 100。 我已放入此函数以使其
在我的页面中有一个选项可以创建新的日期字段输入框。用户可以根据需要创建尽可能多的“截止日期”和“起始日期”框。就像, 日期_to1 || date_from1 日期到2 ||日期_from2 date
我有一个像这样的 Yaml 文件 name: hhh_aaa_bbb arguments: - !argument name: inputsss des
有没有办法在动态字段上使用 jquery 验证表单。 我想将其设置为必填字段 我正在使用 Jsp 动态创建表单字段。 喜欢 等等...... 我想使用必需的表单字段验证此表单字段。 最佳答
嗨,任何人都可以通过提供 JavaScript 代码来帮助我验证用户名文本框不应包含数字,它只能包含一个字符。 最佳答案 使用正则表达式: (\d)+ 如果找到匹配项,则字符串中就有一个数字。 关于J
我有两个输入字段holidayDate和Description(id=tags) $(document).ready(function() {
我遇到了这个问题,这些验证从电子邮件验证部分开始就停止工作。 我只是不明白为什么即使经过几天的观察,只是想知道是否有人可以在这里指出我的错误? Javascript部分: function valid
我是一名优秀的程序员,十分优秀!