bootstrap-validate icon indicating copy to clipboard operation
bootstrap-validate copied to clipboard

Check a group of input (well a group of 2)...

Open djournois opened this issue 2 years ago • 1 comments

Do you imagine a way to 1) check that emails syntaxes are ok 2) have at least one of the two address filled ?

<div class="form-group">
    <label for="emailpro" class="control-label"><strong>Pro email</strong></label>
    <input type="text" class="form-control" id="emailpro" name="emailpro">
</div>
<script>
    bootstrapValidate('#emailpro', 'email:does not look like an email address');
</script>

<div class="form-group">
    <label for="emailperso"><strong>Perso email</strong></label>
    <input type="text" class="form-control" id="emailperso" name="emailperso">
</div>
<script>
    bootstrapValidate('#emailperso', 'email:does not look like an email address');
</script>

djournois avatar Jun 19 '23 19:06 djournois

I dont think this works right now, this would be something like a "required unless" another field is present rule.

PascaleBeier avatar Jul 16 '23 21:07 PascaleBeier