Link in validation summary message

后端 未结 6 1482
野性不改
野性不改 2020-12-20 17:33

Is it possible to put a HTML link in validation summary message? For example I want to put a link to another page in case there is validation error:

@Html.Va         


        
6条回答
  •  攒了一身酷
    2020-12-20 17:53

    You can check if form is valid by jquery and update div with link text:

    $('form').submit(function(){ if(!this.valid()) $('#divToUpdate').html("read more"); });

提交回复
热议问题