Skip to content

V15: Adds validation to all entity workspaces#17980

Merged
leekelleher merged 25 commits intov15/devfrom
v15/bugfix/validation-for-file-workspaces
Jan 14, 2025
Merged

V15: Adds validation to all entity workspaces#17980
leekelleher merged 25 commits intov15/devfrom
v15/bugfix/validation-for-file-workspaces

Conversation

@iOvergaard
Copy link
Copy Markdown
Contributor

Description

This pull request is part 2 of 2 that fixes #17514 to add validation to workspaces, particularly the name field.

Warning

Make sure pull request #17959 has been merged before merging this one (it contains some of the same changes).

Changes

  • Added a validation context to the base class UmbEntityDetailWorkspaceContextBase so that it is available to all entity workspaces
  • For those workspaces that used a custom name field, they will now use the generic <umb-workspace-header-name-editable /> element which comes with validation out of the box.
  • Some workspaces have an alias, so they will now use the generic <umb-input-with-alias /> element, which also comes with validation.
  • Added readonly mode to the two mentioned components for usage in some workspaces.

How to test

This is most useful to test for: templates, partial views, scripts, stylesheets, data types, and users.

  1. Test that you cannot create an entity without a name and that the client does not send a network request.
  2. Go into an existing entity, clear the name field, and test that you cannot update it.

…all workspaces with a name follows the same interface

this allows the workspace to act as a UmbNamableWorkspace
Copy link
Copy Markdown
Member

@leekelleher leekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it out on the following areas, (drumroll please 🥁 )... Data Types, Data Type Folders, Dictionary (Translations), Document Blueprint Folder, Document Type Folders, Languages, Media Type Folders, Member Groups, Package Builder, Partial Views, Partial View Folders, Relation Types (read-only), Stylesheets, Stylesheet Folders, Scripts, Script Folders, Templates and Users... and the name validation works as expected! 🙌🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants