Minor bug fixes and attribute fixes

This commit is contained in:
Dennis Eichhorn 2016-03-01 20:14:25 +01:00
parent 3637a4d59f
commit b36c9f789a

View File

@ -97,8 +97,6 @@
*/ */
jsOMS.FormManager.prototype.bind = function (id) jsOMS.FormManager.prototype.bind = function (id)
{ {
this.forms = [];
if (typeof id !== 'undefined' && this.ignore.indexOf(id) === -1) { if (typeof id !== 'undefined' && this.ignore.indexOf(id) === -1) {
let form = document.getElementById(id); let form = document.getElementById(id);
@ -131,8 +129,8 @@
jsOMS.FormManager.prototype.validateFormElement = function (e) jsOMS.FormManager.prototype.validateFormElement = function (e)
{ {
/** Validate on change */ /** Validate on change */
if (typeof e.dataset.validate !== 'undefined') { if (typeof e.pattern !== 'undefined') {
if (!(new RegExp(e.dataset.validate)).test(e.value)) { if (!(new RegExp(e.pattern)).test(e.value)) {
return false; return false;
} }
} }