From c2be304345c16bc76b52010692dfb5d54a835ea1 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Fri, 22 Apr 2022 14:10:16 +0200 Subject: [PATCH] fix(ui): improve validation of attributes --- app/views/console/database/collection.phtml | 22 ++++++++++----------- app/views/console/database/document.phtml | 10 ++++++++++ 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/app/views/console/database/collection.phtml b/app/views/console/database/collection.phtml index 1bdef71d18..eb045c9f2c 100644 --- a/app/views/console/database/collection.phtml +++ b/app/views/console/database/collection.phtml @@ -621,7 +621,7 @@ $logs = $this->getParam('logs', null); data-failure-param-alert-text="Failed to create attribute" data-failure-param-alert-classname="error" @reset="array = required = false" - x-data="{ array: false, required: false }"> + x-data="{ array: false, required: false, size: null }"> @@ -631,7 +631,7 @@ $logs = $this->getParam('logs', null);
Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
- +
  Required @@ -643,7 +643,7 @@ $logs = $this->getParam('logs', null); @@ -197,6 +202,8 @@ $logs = $this->getParam('logs', null); :placeholder="attr.default" :name="attr.key" :required="attr.required" + :min="attr.min" + :max="attr.max" x-model="doc[attr.key][index]" data-cast-to="integer" /> @@ -207,6 +214,8 @@ $logs = $this->getParam('logs', null); :placeholder="attr.default" :name="attr.key" :required="attr.required" + :min="attr.min" + :max="attr.max" x-model="doc[attr.key][index]" data-cast-to="float" /> @@ -226,6 +235,7 @@ $logs = $this->getParam('logs', null); :placeholder="attr.default" :name="attr.key" :required="attr.required" + :maxlength="attr.size" x-model="doc[attr.key][index]" data-cast-to="string">