ODER
Registrierung
$/,"allowName":false,"message":"E-Mail-Adresse ist keine gültige E-Mail-Adresse.","enableIDN":false,"skipOnEmpty":1});}},{"id":"registrationform-name","name":"name","container":".field-registrationform-name","input":"#registrationform-name","error":".help-block.invalid-feedback","enableAjaxValidation":true,"validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"Name darf nicht leer sein."});yii.validation.string(value, messages, {"message":"Name muss eine Zeichenkette sein.","max":255,"tooLong":"Name darf maximal 255 Zeichen enthalten.","skipOnEmpty":1});}},{"id":"registrationform-password","name":"password","container":".field-registrationform-password","input":"#registrationform-password","error":".help-block.invalid-feedback","enableAjaxValidation":true,"validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"Passwort darf nicht leer sein."});yii.validation.string(value, messages, {"message":"Passwort muss eine Zeichenkette sein.","min":6,"tooShort":"Passwort muss mindestens 6 Zeichen enthalten.","skipOnEmpty":1});}},{"id":"registrationform-verifypassword","name":"verifyPassword","container":".field-registrationform-verifypassword","input":"#registrationform-verifypassword","error":".help-block.invalid-feedback","enableAjaxValidation":true,"validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"Passwort nochmal darf nicht leer sein."});yii.validation.string(value, messages, {"message":"Passwort nochmal muss eine Zeichenkette sein.","min":6,"tooShort":"Passwort nochmal muss mindestens 6 Zeichen enthalten.","skipOnEmpty":1});yii.validation.compare(value, messages, {"operator":"==","type":"string","compareAttribute":"registrationform-password","compareAttributeName":"RegistrationForm[password]","skipOnEmpty":1,"message":"Die beiden Passwörter stimmen nicht überein."}, $form);}},{"id":"registrationform-agree","name":"agree","container":".field-registrationform-agree","input":"#registrationform-agree","error":".help-block.invalid-feedback","enableAjaxValidation":true,"validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"Sie müssen die Bedingungen akzeptieren.","requiredValue":1});}},{"id":"registrationform-subscribed","name":"subscribed","container":".field-registrationform-subscribed","input":"#registrationform-subscribed","error":".help-block.invalid-feedback","enableAjaxValidation":true,"validate":function (attribute, value, messages, deferred, $form) {yii.validation.number(value, messages, {"pattern":/^\s*[+-]?\d+\s*$/,"message":"Subscribed muss eine Ganzzahl sein.","skipOnEmpty":1});}}], []); $('#registration-modal-form').on('beforeSubmit', function(e) { e.preventDefault(); $('#registration-modal-form').LoadingOverlay("show"); var form = $(this); var data = form.serializeArray(); data.push({name: 'send', value: 1}); console.log(data); $.post( form.attr("action"), //serialize Yii2 form data ).done(function(result) { if (typeof(result.succes) != "undefined" || result.succes != null) { $('#registration-modal-form').LoadingOverlay("hide"); } }).fail(function() { console.log("server error"); }); return false; });