-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form validation #93
base: master
Are you sure you want to change the base?
Form validation #93
Conversation
@@ -0,0 +1,23 @@ | |||
({ | |||
shouldDeps: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i-bem-dom
to mustDeps
and 'events', 'form' to shouldDeps
provide(bemDom.declBlock(this.name, { | ||
|
||
_onSubmit(e) { | ||
if(e.bemTarget.validate().hasErrors) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (
(add space)
({ | ||
mustDeps: [ | ||
'i-bem-dom', | ||
{ block: 'form', elem: 'control' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try to move to shouldDeps
}, | ||
|
||
/** | ||
* Проверяет пустое ли значение |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
English
|
||
/** | ||
* @typedef {Object} ValidationStatus | ||
* @property {BemEntity} control - контрол формы который содержит ошибки |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
English
popup | ||
.setAnchor(this._getErrorAnchor()) | ||
.setContent(BEMHTML.apply({ | ||
block: 'tooltip', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
form__control-message
No description provided.