-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨feat: add nice dynamic validation (#29)
- Loading branch information
1 parent
afd5c75
commit d204b4e
Showing
5 changed files
with
239 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,41 @@ | ||
<div class='overlay'> | ||
<form novalidate method='POST' class='popup' id='auth-form'> | ||
<form novalidate method='POST' class='auth-modal' id='auth-form'> | ||
<div class='close-cross'> | ||
<a> | ||
<img src='/svg/cross.svg' width='30' /> | ||
</a> | ||
</div> | ||
<img class='auth-img' src='/name.png' /> | ||
<img class='auth-logo' src='/name.png' /> | ||
|
||
<div class='auth-message'>{{authMessage}}</div> | ||
<div class='popup__failure-message none'>Неправильный логин или пароль!</div> | ||
<div class='popup__div'> | ||
<div class='auth-modal__fields-container'> | ||
{{#each inputs}} | ||
<div class='popup__inputAndValidationMessage'> | ||
<div class='auth-modal__field-container'> | ||
<input | ||
class='auth-modal__input' | ||
name='{{@key}}' | ||
placeholder='{{this.placeholder}}' | ||
type='{{this.type}}' | ||
minlength='{{this.minLen}}' | ||
maxlength='{{this.maxLen}}' | ||
required='{{this.required}}' | ||
data-validation-type='{{this.validationType}}' | ||
/> | ||
|
||
<a class='none popup__exclamation'> | ||
<img src='/svg/exclamation.svg' width='20' alt='!' /> | ||
</a> | ||
<div class='popup__validationMessage none'></div> | ||
<p | ||
class='js-error-text auth-modal__error' | ||
aria-live='polite' | ||
> | ||
<!-- error text here --> | ||
</p> | ||
</div> | ||
{{/each}} | ||
|
||
</div> | ||
<button class='popup__button'>{{buttonText}}</button> | ||
<div class='have-account'><p>{{bottomText}}</p><a | ||
class='bold popup__a' | ||
>{{bottomAText}}</a></div> | ||
<button class='auth-modal__sign-in-button'>{{buttonText}}</button> | ||
<div class='have-account'><p>{{bottomText}}</p> | ||
<a class='bold auth-modal__a'>{{bottomAText}}</a> | ||
</div> | ||
</form> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.