diff options
| author | Marin Ivanov <[email protected]> | 2024-08-21 04:37:31 +0300 |
|---|---|---|
| committer | Marin Ivanov <[email protected]> | 2024-08-21 04:37:31 +0300 |
| commit | e259a1465e5417220e85dd7b6136d15135f4d95a (patch) | |
| tree | 2e89a72a8009e9cabd1d53582c818cc80ad8a9e8 /app.js | |
| parent | 2c417fb8398eda685c5dd1f7b1bec811757dc562 (diff) | |
bug fixes
Diffstat (limited to 'app.js')
| -rw-r--r-- | app.js | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -88,11 +88,13 @@ let inp = input("text") .$attr("id","form__"+f.id) .$attr("name",f.id) - .$attr("required",!!f.required) .$value(state[f.id]??null) .$change2state(state, f.id); + if (f.required) { + inp.$attr("required","required"); + } if (f.pattern) { - inp.$attr("pattern", f.pattern??null); + inp.$attr("pattern", f.pattern); } if (f.invalidmsg) { inp.oninvalid = () => inp.setCustomValidity(f.invalidmsg); @@ -155,4 +157,4 @@ mount(app, CApp); loadconfig(); -})() +})(); |
