0
Good I have in my form
field select
which is populated with data coming from the database, but with the use of Bootstrap Validator
, it does not validate correctly, now if I take the code PHP
it validates correctly.
What can it be.
Below this is my select field:
<div class="form-group">
<label for="AgentePG" class=" control-label">PG</label>
<select class="form-control" id="AgentePG" name="pg" data-bv-notempty data-bv-notempty-message="The country is required">
<option value="">Selecione...</option>
<?php
$sql = DB::getInstance();
$sql = "SELECT * FROM pg";
$stmt = DB::prepare($sql);
$stmt->execute();
$busca = $stmt->fetchAll();
foreach ($busca as $linha) {
echo '<option value=' . $linha->id . '>' . $linha->pg . </option>';
}
?>
</select>
</div>