I am quite new to ASP.NET, I am trying to use the HTML5 required
attribute on a textbox.
<form action="/../.." method="post" style="margin-bottom: 20px;" id="testform">
<input type="text" name="Username" required="required">
<input type="submit" class="btn btn-primary" value="Sign In" name="Submit"/>
</form>
When i submit my form without filling the textbox with data, it doesnt show any error message:
When I inspect my form, i see a class has been added by required
, but no error message shows:
The same code works fine in JSFiddle, Check it out here