Formular Validieren funktioniert nicht

Hallo,
ich möchte in einem eigenen Formular die Meldungen von “PW ändern” nutzen.
leider ist kein Event bei den Textfeldern vorhanden.

Ich habe die jqBootstrapValidation.min.js eingebunden, da sie nicht geladen wurde.
Hier seht ihr meinen Quelltext.

< div class=“form-group”>
< div class=“col-lg-12”>
< input id=“pw” class=“form-control js-oxValidate js-oxValidate_notEmpty js-oxValidate_length js-oxValidate_match” type=“password” name=“pw” placeholder=“Passwort” value=“” pattern=“((?=.\d)(?=.[a-z])(?=.[A-Z])(?=.[!?§$%&ß#]).{6,20})” required=“”>
< div class=“help-block”>[{if $error.pw == “1”}]

[{oxmultilang ident=“REGISTER2_error_pw”}]
[{/if}]
</ div>
</ div>
< div class=“form-group”>
< div class=“col-lg-12”>
< input type=“password” name=“pw2” placeholder=“Passwort wiederholen” value=“” pattern=“((?=.\d)(?=.[a-z])(?=.[A-Z])(?=.[!?§$%&ß#]).{6,20})” class=“form-control js-oxValidate js-oxValidate_notEmpty js-oxValidate_length js-oxValidate_match” required=“” data-validation-matches-match=“pw” data-validation-matches-message=“[{oxmultilang ident=“ERROR_MESSAGE_PASSWORD_DO_NOT_MATCH”}]”>
< div class=“help-block”>[{if $error.pw2 == “1”}]
[{oxmultilang ident=“REGISTER2_error_pw2”}]
[{/if}]
[{if $error.pwfail == “1”}]< div class=“r2error”>[{oxmultilang ident=“REGISTER2_error_pwfail”}]</ div>[{/if}]
< input type=“hidden” name=“r2step” value=“4”>
</ div>
</ div>
< script type=“text/javascript” src=“https://shop.xx/out/wave/src/js/libs/jqBootstrapValidation.min.js?1627825971”>

Danke Thoni

Schau Dir doch einfach die normale Anmeldeseite in Wave an.

<script>
    var oWave = oWave || [];
    oWave.i18n =
        {
            DD_FORM_VALIDATION_VALIDEMAIL:     "Bitte geben Sie eine gültige E-Mail-Adresse ein.",
            DD_FORM_VALIDATION_PASSWORDAGAIN:  "Die Passwörter stimmen nicht überein.",
            DD_FORM_VALIDATION_NUMBER:         "Bitte geben Sie eine Zahl ein.",
            DD_FORM_VALIDATION_INTEGER:        "Es sind keine Nachkommastellen erlaubt.",
            DD_FORM_VALIDATION_POSITIVENUMBER: "Bitte geben Sie eine positive Zahl ein.",
            DD_FORM_VALIDATION_NEGATIVENUMBER: "Bitte geben Sie eine negative Zahl ein.",
            DD_FORM_VALIDATION_REQUIRED:       "Bitte Wert angeben.",
            DD_FORM_VALIDATION_CHECKONE:       "Bitte wählen Sie mindestens eine Option.",
            NAV_MORE:                          "Mehr"
        };
</script>        
    
	

            

    
    <script type="text/javascript" src="https://xxx/out/wave/src/js/script.min.js?1666099391"></script>
<script type="text/javascript" src="https://xxx/out/wave/src/js/widgets/oxequalizer.min.js?1666099391"></script>
$(window).on('load', function(){ if( !isMobileDevice() ) { oxEqualizer.equalHeight( $( '.checkoutOptions .card-body' ) ); } });
$('input,select,textarea').not('[type=submit]').jqBootstrapValidation();</script>

Danke!

Die Meldungen bzl. des Formates funktionieren.

Allerdings zeigt sich immer die Meldung, dass die Passwörter nicht gleich sind. Gebe ich dem zweiten Passwortfeld auch eine ID, kommt die Meldung gar nicht mehr.

Zudem funktioniert der Weiter-Button nicht mehr und man kann sich nicht registrieren.

Steht was in der JS-Console?

Sonst zeig doch mal bitte das gesamte Konstrukt.

< form class=“register2content” action=“https://shop.xx/index.php?cl=register” method=“post”>

< br>
< div class=“text”>Bitte tragen Sie Ihre E-Mail-Adresse ein und teilen Sie uns Ihr gewünschtes Passwort mit. Auf die angegebene E-Mail-Adresse bestätigen wir im Anschluss Ihre Anmeldung.< /div>
< br>
< div class=“form-group”>
< div class=“col-lg-12”>
< input class=“js-oxValidate js-oxValidate_notEmpty form-control” type=“email” name=“mail” placeholder=“Email-Adresse” value=“” required=“” aria-invalid=“false”>
< /div>
< /div>
< br>
< div class=“text”>Bitte wählen Sie ein Passwort mit 8 bis 20 Zeichen.< br>Es muss mindestens je einen Großbuchstaben, einen Kleinbuchstaben, eine Zahl und ein Sonderzeichen (!?§$%&ß#) enthalten. < /div>
< br>
< div class=“form-group”>
< div class=“col-lg-12”>
< input id=“password” class=“form-control js-oxValidate js-oxValidate_notEmpty js-oxValidate_length js-oxValidate_match” type=“password” name=“pw” placeholder=“Passwort” value=“” pattern=“((?=.\d)(?=.[a-z])(?=.[A-Z])(?=.[!?�$%&�#]).{6,20})” required=“” aria-invalid=“false”>
< div class=“help-block”>< /div> < /div>
< /div>
< div class=“form-group text-warning”>
< div class=“col-lg-12”>
< input id=“passwordConfirm” type=“password” name=“pw2” placeholder=“Passwort wiederholen” value=“” pattern=“((?=.\d)(?=.[a-z])(?=.[A-Z])(?=.[!?�$%&�#]).{6,20})” class=“form-control js-oxValidate js-oxValidate_notEmpty js-oxValidate_length js-oxValidate_match” required=“” data-validation-matches-match=“password” data-validation-matches-message=“< !–Fehler: Die Passwörter stimmen nicht überein.–>” aria-invalid=“true”>
< div class=“help-block”>< ul class=“list-unstyled text-danger” role=“alert”>< li>< !–Fehler: Die Passwörter stimmen nicht überein.–>< /li>< /ul>< /div> < input type=“hidden” name=“r2step” value=“4” aria-invalid=“false”>
< /div>
< /div>

< script>
var oWave = oWave || ;
oWave.i18n =
{
DD_FORM_VALIDATION_VALIDEMAIL: “Bitte geben Sie eine g�ltige E-Mail-Adresse ein.”,
DD_FORM_VALIDATION_PASSWORDAGAIN: “Die Passw�rter stimmen nicht �berein!”,
DD_FORM_VALIDATION_MASSAGE: “Ung�ltiges Format des Passwortes.”,
validationPatternMessage: “Ung�ltiges Format des Passwortes!”,
DD_FORM_VALIDATION_NUMBER: “Bitte geben Sie eine Zahl ein.”,
DD_FORM_VALIDATION_INTEGER: “Es sind keine Nachkommastellen erlaubt.”,
DD_FORM_VALIDATION_POSITIVENUMBER: “Bitte geben Sie eine positive Zahl ein.”,
DD_FORM_VALIDATION_NEGATIVENUMBER: “Bitte geben Sie eine negative Zahl ein.”,
DD_FORM_VALIDATION_REQUIRED: “Bitte Wert angeben.”,
DD_FORM_VALIDATION_CHECKONE: “Bitte w�hlen Sie mindestens eine Option.”,
NAV_MORE: “Mehr”
};
< /script>

  < script type="text/javascript" src="https://shop.xx/out/myshop/src/js/script.min.js?1666099391">< /script>

< script type=“text/javascript” src=“https://shop.xx/out/wave/src/js/widgets/oxequalizer.min.js?1666099391”>< /script>
< script type=“text/javascript”>$(window).on(‘load’, function(){ if( !isMobileDevice() ) { oxEqualizer.equalHeight( $( ‘.checkoutOptions .card-body’ ) ); } });
< /script>

< script type=“text/javascript” src=“https://shop.xx/out/myshop/src/js/libs/jqBootstrapValidation.min.js?1627825971”>< /script>< script type=“text/javascript”>$(‘input,select,textarea’).not(‘[type=submit]’).jqBootstrapValidation();< /script>

                 < p class="button">
                    < input type="hidden" name="stoken" value="5FD54CBC">

< input type=“hidden” name=“lang” value=“0”>
< input type=“hidden” name=“actcontrol” value=“user”>

                    < input type="hidden" name="cl" value="user">
                    < input type="hidden" name="fnc" value="">
                    < input type="hidden" name="option" value="4">
                    < button class="submitButton nextStep btn btn-primary" type="submit">Weiter< /button>                    < /p>

< /form>

Der Cursor geht beim Absenden in das zweite Passwort-Feld.

JS-Console:

unreachable code after return statement
script.min.js:14:16598

unreachable code after return statement
script.min.js:14:16598

Source-Map-Fehler: Error: request failed with status 404
Ressourcen-Adresse: https://shop.xx/out/myshop/src/js/script.min.js?1677403556
Source-Map-Adresse: script.min.js.map

Source-Map-Fehler: Error: request failed with status 404
Ressourcen-Adresse: https://shop.xx/out/myshop/src/js/script.min.js?1666099391
Source-Map-Adresse: script.min.js.map

Wenn ich script.min.js?1666099391 rausnehme:

Uncaught TypeError: a.widget is not a function
https://shop.xx/out/wave/src/js/widgets/oxequalizer.min.js?1666099391:1
https://shop.xx/out/wave/src/js/widgets/oxequalizer.min.js?1666099391:1
oxequalizer.min.js:1:517

unreachable code after return statement

script.min.js:14:16598
Source-Map-Fehler: Error: request failed with status 404
Ressourcen-Adresse: https://shop.xx/out/myshop/src/js/script.min.js?1677403556
Source-Map-Adresse: script.min.js.map

Die Datei wird lt. Netzwerkanalyse mit 200 geladen.

Wenn ich beim zweiten PW-Feld den name des ersten angebe:
data-validation-matches-match=“pw”
… kann ich weiterklicken, aber nur, wenn die Passwörter übereinstimmen.
Eine Fehlermeldung wird jedoch bei Unterschieden nicht ausgegeben und es geht nicht weiter.

SORRY: Die Fehlermeldung stand in Kommentarzeichen.

Es scheint jetzt alles zu funktionieren.

Danke

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.