The code I have works well enough for adding and editing these items, however as you can see from the code I would like the 'name' property, exposed through umb-property-editor under propName, to be a required field.
So far I've tried manually validating it through my validate() function, however notificationsService.error(x) seems to be incorrect for infinite editors as it shows below the editor on the dashboard.
My question is: What is the correct way to validate a umb-property-editor like it is in other parts of Umbraco? Such as having a red label, red boarder around the input, and a message near the field or error toast on validation failure as I've seen before. And am I going the wrong direction with what I have already?
Validation for umb-property-editor in custom infinite editor
Hi,
I've been making a property editor to hold multiple 'items' of content recently. These items can be seen below
The adding and editing of these items is done through a custom infinite editor launched with
editorService.open(x)
as seen belowEditor view
Editor controller
The code I have works well enough for adding and editing these items, however as you can see from the code I would like the 'name' property, exposed through
umb-property-editor
underpropName
, to be a required field.So far I've tried manually validating it through my
validate()
function, howevernotificationsService.error(x)
seems to be incorrect for infinite editors as it shows below the editor on the dashboard.My question is: What is the correct way to validate a
umb-property-editor
like it is in other parts of Umbraco? Such as having a red label, red boarder around the input, and a message near the field or error toast on validation failure as I've seen before. And am I going the wrong direction with what I have already?is working on a reply...