LP#1904244: fm-editor: prevent all-blank input
authorGalen Charlton <gmc@equinoxOLI.org>
Thu, 3 Jun 2021 14:52:14 +0000 (10:52 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 12 Aug 2021 19:29:26 +0000 (15:29 -0400)
Text inputs no longer accept input that's entirely whitespace.

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Ruth Frasur <rfrasur@library.in.gov>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html

index af9f5f0..1367040 100644 (file)
               <input
                 class="form-control"
                 id="{{idPrefix}}-{{field.name}}" name="{{field.name}}"
-                type="text"
+                type="text" pattern="[\s\S]*\S[\s\S]*"
                 placeholder="{{field.label}}..." i18n-placeholder
                 [required]="field.isRequired()"
                 [ngModel]="record[field.name]()"