Skip to content

Commit 92f4ffa

Browse files
fix to actually use the custom error msg element
1 parent d336103 commit 92f4ffa

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/mm-form/mm-form.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,12 @@
165165
this._updateData(key, value);
166166
this._initialData[key] = value;
167167

168-
if (errorMsg) this._createErrorMsg(key, errorMsg, errorMsgEle, parentEle);
168+
if (errorMsg && !errorMsgEle) {
169+
this._createErrorMsg(key, errorMsg, errorMsgEle, parentEle);
170+
} else {
171+
errorMsgEle.message = errorMsg;
172+
}
173+
169174
if (label) this._createLabel(key, label, field, parentEle);
170175

171176
// Populate the fields if necessary

0 commit comments

Comments
 (0)