Menu icon Foundation
email validation combined with ajax

I am new to foundation and have inherited some work to do.

In a form I have following code:

<div class="row">
    <div class="small-12 column name-field">
        <label class="show-for-medium-up">E-Mail-Adresse:*</label>
        <input type="text" id="emailAddress" name="emailAddress" value="${requestParameters.emailAddress!}" placeholder="" required pattern="email" />  
        <small class="error"><i class="fi-alert"></i>Bitte geben Sie Ihre E-Mail-Adresse ein.</small>
    </div>
</div>
<div class="row">
    <div class="small-12 column name-field">
        <label class="show-for-medium-up">Wiederholung E-Mail-Adresse:*</label>
        <input type="text" name="emailAddressConfirmation" value="${requestParameters.emailAddressConfirmation!}" placeholder="" pattern="email" data-equalto="emailAddress""/>
        <small class="error"><i class="fi-alert"></i>Die E-Mail Adressen stimmen nicht &uuml;berein.</small>
    </div>
</div>
            

         

I understand how that operates, but now I have to add an additional validation that will check the email address against data in the rdbms and is triggered when the two fields match, and show following row beneath the row for the repeat of the email address.

<div class="row">
    <div class="small-12 column name-field">
        <label class="show-for-medium-up">Ihre Kennnummer:</label>
        <input type="text" name="ihreKennnr" value="${requestParameters.mvbKennnr!}" placeholder="" required/>
        <i class="fi-alert"></i>Diese E-Mail-Adresse ist bereits hinterlegt, bitte geben Sie Ihre Kennnummer ein.
    </div>
</div>
            

         

But how do I achieve this?

Regards, and thanks in advance.

Pierre

AJAXemailvalidation

I am new to foundation and have inherited some work to do.

In a form I have following code:

<div class="row">
    <div class="small-12 column name-field">
        <label class="show-for-medium-up">E-Mail-Adresse:*</label>
        <input type="text" id="emailAddress" name="emailAddress" value="${requestParameters.emailAddress!}" placeholder="" required pattern="email" />  
        <small class="error"><i class="fi-alert"></i>Bitte geben Sie Ihre E-Mail-Adresse ein.</small>
    </div>
</div>
<div class="row">
    <div class="small-12 column name-field">
        <label class="show-for-medium-up">Wiederholung E-Mail-Adresse:*</label>
        <input type="text" name="emailAddressConfirmation" value="${requestParameters.emailAddressConfirmation!}" placeholder="" pattern="email" data-equalto="emailAddress""/>
        <small class="error"><i class="fi-alert"></i>Die E-Mail Adressen stimmen nicht &uuml;berein.</small>
    </div>
</div>
            

         

I understand how that operates, but now I have to add an additional validation that will check the email address against data in the rdbms and is triggered when the two fields match, and show following row beneath the row for the repeat of the email address.

<div class="row">
    <div class="small-12 column name-field">
        <label class="show-for-medium-up">Ihre Kennnummer:</label>
        <input type="text" name="ihreKennnr" value="${requestParameters.mvbKennnr!}" placeholder="" required/>
        <i class="fi-alert"></i>Diese E-Mail-Adresse ist bereits hinterlegt, bitte geben Sie Ihre Kennnummer ein.
    </div>
</div>
            

         

But how do I achieve this?

Regards, and thanks in advance.

Pierre