Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Validation is not working in Metronic UI. Why?

Validation is not working properly. Its always shows This field is required. Even if I don't touch this field. Why?

<div class="form-group">
 <label class="control-label col-sm-4">Description<span class="required"> * </span></label>
  <div class="col-sm-8">
    <input type="text" name="name" data-required="1" class="form-control" aria-required="true" aria-invalid="true" aria-describedby="name-error">
      <span id="name-error" class="help-block help-block-error">This field is required.</span>
  </div>
</div>
like image 576
vivek nuna Avatar asked Aug 31 '17 15:08

vivek nuna


Video Answer


1 Answers

You could try adding the name="name" to the label.

Also add for="name" to the label.

like image 103
Jeff Mattson Avatar answered Oct 12 '22 08:10

Jeff Mattson