I have in a form, three SELECT two of them are multiple and one is a simple select. I am using the semantic ui forms validation system. I can validate all the fields, but there is only one that does not validate me.
<div class="field">
<label>País:</label>
<select id="paisnom" class="ui fluid search dropdown" name="paisnom" required>
<option value="0"></option>
<?php
$conexion = new Conexion();
$stmt = $conexion -> prepare("SELECT paiscod, paisnom FROM paises ORDER BY paisnom");
$stmt->execute();
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
if ( $row['paiscod'] == $pais ) { ?>
<option value = "<?php echo $row['paiscod']?>" selected><?php echo ($row['paisnom'])?></option>
<?php } else { ?>
<option value = "<?php echo $row['paiscod']?>"><?php echo ($row['paisnom'])?></option>
<?php }
}?>
</select>
</div>
That way I charge the country select ... and then how it's valid
dropdown3: {
identifier : 'paisnom',
rules: [{
type : 'empty',
prompt : 'Por favor, tiene que elegir un país de residencia'
}]
},
thus valid one of the other two select
dropdown2: {
identifier : 'intereses[]',
rules: [{
type : 'empty',
prompt : 'Por favor, elija algunos temas de su interés'
}]
},
has the right brackets at the end because it is a multiple select
What could be happening?
Any suggestions?