mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-08 02:52:39 -05:00
🐛 Fixed inconsistent character limits for alt text
fixes https://github.com/TryGhost/Ghost/issues/22023 **Summary:** This pull request ensures that users have a seamless experience when managing feature_image_alt text, whether through the API or the Admin panel, by standardizing the character limit across both interfaces. **Changes Implemented:** Updated Character Limit in Admin Panel: Modified the validation logic in the Ghost Admin panel to increase the feature_image_alt character limit from 125 to 190 characters, matching the Admin API's allowance. **Use-Case for This Change:** Users utilizing the Admin API can set feature_image_alt text up to 190 characters. However, when editing such posts in the Admin panel, they encounter errors due to the lower character limit. This change ensures consistency between the API and Admin panel, enhancing usability and preventing potential data loss or errors during post edits.
This commit is contained in:
parent
b3a30d63ee
commit
862e345c5b
1 changed files with 2 additions and 2 deletions
|
@ -205,8 +205,8 @@ export default BaseValidator.create({
|
|||
},
|
||||
|
||||
featureImageAlt(model) {
|
||||
if (!validator.isLength(model.featureImageAlt || '', 0, 125)) {
|
||||
model.errors.add('featureImageAlt', 'Feature image alt text cannot be longer than 125 characters.');
|
||||
if (!validator.isLength(model.featureImageAlt || '', 0, 191)) {
|
||||
model.errors.add('featureImageAlt', 'Feature image alt text cannot be longer than 191 characters.');
|
||||
this.invalidate();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue