on-codemerge
Version:
A WYSIWYG editor for on-codemerge is a user-friendly interface that allows users to edit and view their code in real time, exactly as it will appear in the final product
2 lines (1 loc) • 462 B
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class n{addValidation(i,t){const e=i.querySelector("input, select, textarea");e&&(t.required&&e.setAttribute("required","true"),t.pattern&&e.setAttribute("pattern",t.pattern),t.minLength&&e.setAttribute("minlength",t.minLength),t.maxLength&&e.setAttribute("maxlength",t.maxLength),t.min&&e.setAttribute("min",t.min),t.max&&e.setAttribute("max",t.max))}}exports.ValidationManager=n;