jQuery验证:如何不显示错误?或如何将错误显示为工具提示? [英] jQuery Validation: How to not display errors? OR How to display errors as a tooltip?
问题描述
我希望我的错误浮于上方,向左对齐,这是无效的输入字段.我该怎么办?
I want my errors to float above, left-justified, the input field that doesn't validate. How can I do this?
如果不能,如何关闭错误?我仍然希望这些字段进行验证(并突出显示错误),但不希望显示实际的错误消息.我似乎无法在jQuery文档中找到让我打开/关闭它们的任何内容... ??
If I can't, how can I turn the errors off? I still want the fields to validate (and highlight on error), but not for the actual error messages to display. I couldn't seem to find anything in the jQuery docs that would let me turn them on/off... ??
推荐答案
您需要errorPlacement选项,也许还需要errorContainer和errorElement来进行进一步的自定义.
You want the errorPlacement option, and perhaps errorContainer and errorElement for further customization.
请参见 http://docs.jquery.com/Plugins/Validation/validate#toptions
这篇关于jQuery验证:如何不显示错误?或如何将错误显示为工具提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!