Show form default Validation Status Programmatically

后端 未结 2 1014
孤街浪徒
孤街浪徒 2020-12-21 06:23

I want to submit a form using ajax. So I am not using the type=submit. I am using a onClick event on a link() to send the for

2条回答
  •  遥遥无期
    2020-12-21 07:17

    We have exactly the same problem and we tried very different things and a lot of them were hacks like pseudo submits and event.preventDefault() approaches. All in all i must say that HTML5 validation is nice in general but really bad in practice because its not possible to display backend validation errors the same way as frontend validation errors.

    And only god knows why the HTML5 folks didnt thought about a simple API where we can trigger the validation like this element.triggerValidationMessage('my message');

提交回复
热议问题