jQuery Validation - Hide Error Message

后端 未结 10 1657
醉梦人生
醉梦人生 2021-02-05 03:39

I\'m using the jQuery Validation plugin and want to disable the or element/container it creates to display the error \'message\'.

Basically, I want the input element wi

10条回答
  •  后悔当初
    2021-02-05 03:42

    Possibly a far simpler and semantically preferable solution would be to use css

    label.error {
      position:absolute;
      left:20000px;
      top:0;
      }
    input.error {
      border:red 1px;
     }
    

    No JS required, easier to manage and someone with a screen reader will actually have some indication that they have missed something

提交回复
热议问题