Add validation to page attribute


I'd like to have a limit on how long the text can be for a certain page attribute and then have some error message pop up if the text is too long. This is easy to do for block forms but I have no idea how I do this for attributes. I'm not sure if the attribute is a custom made or not, it's called meta_description.

View Replies: View Best Answer
MrKDilkington replied on at Permalink Best Answer Reply
Hi pat101,

The Meta Description attribute is a textarea attribute type.

You might be able to override the textarea attribute type to add a string length validation that can be set per attribute.

The other option might be to fork the the textarea attribute type and hard code the validation or add the per attribute string length validation.