update form validation
This commit is contained in:
parent
6086d41474
commit
8c314bff50
6 changed files with 16 additions and 3 deletions
|
|
@ -121,7 +121,7 @@
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div class="btns">
|
<div class="btns">
|
||||||
@if (currentUserId !== firebaseService.getCurrentUserId()){
|
@if (currentUserId){
|
||||||
<app-form-btn
|
<app-form-btn
|
||||||
class="btn-delete"
|
class="btn-delete"
|
||||||
type="button"
|
type="button"
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
class="custom-input"
|
class="custom-input"
|
||||||
autocomplete="new-password"
|
autocomplete="new-password"
|
||||||
[(ngModel)]="pwResetData.password"
|
[(ngModel)]="pwResetData.password"
|
||||||
|
pattern="[^<>]*"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@if(!pwResetData.password) {
|
@if(!pwResetData.password) {
|
||||||
|
|
@ -56,6 +57,7 @@
|
||||||
class="custom-input"
|
class="custom-input"
|
||||||
autocomplete="new-password"
|
autocomplete="new-password"
|
||||||
[(ngModel)]="pwResetData.passwordConfirm"
|
[(ngModel)]="pwResetData.passwordConfirm"
|
||||||
|
pattern="[^<>]*"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@if(!pwResetData.passwordConfirm) {
|
@if(!pwResetData.passwordConfirm) {
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@
|
||||||
placeholder="{{ 'login.password' | translate }}"
|
placeholder="{{ 'login.password' | translate }}"
|
||||||
class="custom-input"
|
class="custom-input"
|
||||||
autocomplete="current-password"
|
autocomplete="current-password"
|
||||||
|
pattern="[^<>]*"
|
||||||
[(ngModel)]="loginData.password"
|
[(ngModel)]="loginData.password"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,12 @@
|
||||||
id="name"
|
id="name"
|
||||||
name="name"
|
name="name"
|
||||||
#name="ngModel"
|
#name="ngModel"
|
||||||
|
maxlength="20"
|
||||||
placeholder="{{ 'register.name' | translate }}"
|
placeholder="{{ 'register.name' | translate }}"
|
||||||
class="custom-input"
|
class="custom-input"
|
||||||
autocomplete="name"
|
autocomplete="name"
|
||||||
[(ngModel)]="registerData.name"
|
[(ngModel)]="registerData.name"
|
||||||
|
pattern="[A-Za-z ]+"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@if(!registerData.name) {
|
@if(!registerData.name) {
|
||||||
|
|
@ -37,9 +39,13 @@
|
||||||
<img class="custom-img" alt="" />
|
<img class="custom-img" alt="" />
|
||||||
}
|
}
|
||||||
<div class="error-msg">
|
<div class="error-msg">
|
||||||
@if (!name.valid && name.touched && !sharedService.isBtnDisabled) {
|
@if (name.hasError('pattern') && name.touched &&
|
||||||
|
!sharedService.isBtnDisabled) {
|
||||||
|
<p>{{ "register.errorPattern" | translate }}</p>
|
||||||
|
} @else { @if (!name.valid && name.touched &&
|
||||||
|
!sharedService.isBtnDisabled) {
|
||||||
<p>{{ "register.errorName" | translate }}</p>
|
<p>{{ "register.errorName" | translate }}</p>
|
||||||
}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<input
|
<input
|
||||||
type="mail"
|
type="mail"
|
||||||
|
|
@ -86,6 +92,7 @@
|
||||||
class="custom-input"
|
class="custom-input"
|
||||||
autocomplete="new-password"
|
autocomplete="new-password"
|
||||||
[(ngModel)]="registerData.password"
|
[(ngModel)]="registerData.password"
|
||||||
|
pattern="[^<>]*"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@if(!registerData.password) {
|
@if(!registerData.password) {
|
||||||
|
|
@ -120,6 +127,7 @@
|
||||||
class="custom-input"
|
class="custom-input"
|
||||||
autocomplete="new-password"
|
autocomplete="new-password"
|
||||||
[(ngModel)]="registerData.passwordConfirm"
|
[(ngModel)]="registerData.passwordConfirm"
|
||||||
|
pattern="[^<>]*"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@if(!registerData.passwordConfirm) {
|
@if(!registerData.passwordConfirm) {
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@
|
||||||
"privacyPolicy0": "Ich akzeptiere die",
|
"privacyPolicy0": "Ich akzeptiere die",
|
||||||
"privacyPolicy1": "Datenschutzerklärung",
|
"privacyPolicy1": "Datenschutzerklärung",
|
||||||
"privacyPolicyError": "Sie müssen die Datenschutzbestimmungen akzeptieren!",
|
"privacyPolicyError": "Sie müssen die Datenschutzbestimmungen akzeptieren!",
|
||||||
|
"errorPattern": "Bitte nur Buchstaben und Leerzeichen verwenden!",
|
||||||
"errorName": "Sie müssen einen Namen eingeben!",
|
"errorName": "Sie müssen einen Namen eingeben!",
|
||||||
"errorMail0": "Sie müssen eine E-Mail Adresse eingeben!",
|
"errorMail0": "Sie müssen eine E-Mail Adresse eingeben!",
|
||||||
"errorMail1": "Dies ist kein gültiges E-Mail-Format!",
|
"errorMail1": "Dies ist kein gültiges E-Mail-Format!",
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@
|
||||||
"privacyPolicy0": "I accept the",
|
"privacyPolicy0": "I accept the",
|
||||||
"privacyPolicy1": "Privacy policy",
|
"privacyPolicy1": "Privacy policy",
|
||||||
"privacyPolicyError": "You must accept the privacy policy!",
|
"privacyPolicyError": "You must accept the privacy policy!",
|
||||||
|
"errorPattern": "Please use only letters and spaces!",
|
||||||
"errorName": "You must enter a name!",
|
"errorName": "You must enter a name!",
|
||||||
"errorMail0": "You must enter a mail!",
|
"errorMail0": "You must enter a mail!",
|
||||||
"errorMail1": "This is not a valid email format!",
|
"errorMail1": "This is not a valid email format!",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue