我试图更改表单验证消息自定义。但无法改变,总是给我一个“这个字段是必需的。 ”。我的html代码如下:
<form id="UserSaveForm" method="post" class="form-horizontal" enctype="multipart/form-data" autocomplete="off">
<div class="col-md- b-r" style="padding-right:30px;">
<div class="form-group" id="data_1">
<label class="font-normal">User Save Date</label>
<div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input id="UserStartedDate" name="UserStartedDate" data-date-format="dd/mm/yyyy" data-date-end-date="0d" type="text" class="form-control" required="" oninvalid="this.setCustomValidity('THİS İS MY CUSTOM VALİDATİON MESSAGE')"
oninput="setCustomValidity('')" >
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<div class="row">
<button id="AddUser" type="button" class="btn pull-right btn-primary hidden" data-style="expand-right">Save</button>
</div>
</div>
</div>
</form>