Fix: #18421 - Added Max Length validation to PropertyTypeBasic Alias#18427
Fix: #18421 - Added Max Length validation to PropertyTypeBasic Alias#18427iOvergaard merged 5 commits intoumbraco:v13/contribfrom
Conversation
…ertyTypeBasic Alias Property
|
Hi there @danielhnelson, thank you for this contribution! 👍 While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:
Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution. If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
|
I think it could also add |
|
Hi Bjarne, that sounds like the equivalent fix for V14+, which would be great to get opened if the issue is also present there, however this fix is targeting v13, which doesn't use the new UI. |
|
Hi @danielhnelson , Thanks a lot for spotting the issue and providing the fix 👍 In the meantime, I see this is your first contribution to the Umbraco CMS. Thanks again, and congratulations 😁 Cheers! |
|
Hi Mike, thank you! My account name on our.umbraco.com is the same as this one - danielhnelson. Thanks! |
Yes, it could however still add it in the property editor component. It seems already to handle it here for name field: However it may be possible to edit alias afterwards to move than 255 characters. |
|
Hi both, just returning to this issue finally, I've looked into the client-side validation further following the comment from @bjarnef. I think this is a wider question than how we add validation to We could update the Does anyone have any thoughts on this? Happy to have a go at implementing the client-side validation to prevent the user saving the long alias and not worry about this wider question for now. 🙂 |
|
I think it would be fine to set And if this it would be better to avoid truncating text. Generally this is not great UX in textbox/textarea, but better warn about it. |
…nding validation label
|
I've now added max length validation to the |
Description
Fixes Umbraco 13.X Back Office exception caused by a user attempting to save a PropertyType with an alias over 255 characters long.
This is fixed by adding a MaxLength attribute to the property in the PropertyTypeBasic class.
Fixes #18421.