Hi Martin, did you ever find a solution for this, I am facing the same issue?
Cheers
Chris
Hi!
As you said, the MaxLength property does not seem to do anything but I've written an example of a custom property that validates the length according to a given max length server side:
http://world.episerver.com/Templates/Forum/Pages/Thread.aspx?id=33667&epslanguage=en
Linus Ekström
EPiServer Development Team
Thanks Linus,
I did end up using the ApplyEditChanges method in the end, which works well for my requirements at the moment, I did read that in CMS 6 there will be the option to set "settings" on custom properties, ideally what i'd like is to have one custom property, with a setting which can be set for the max length. I can then have multiple properties on a page type, all with different max lengths, are you aware of this in CMS 6?
Regards
Chris
Hi!
It's possible to define different settings for the different properties on your page type or you could even define a couple of global property settings and just use the setting you want for the properties on your different page types. This way you only have to do a change in one place if you decide to change the length for one of your property settings even if this is used on multiple page types. See this blog entry for more details regarding property settings:
http://labs.episerver.com/en/Blogs/Linus-Ekstrom1/Dates/2009/10/Settings-for-properties/
Regards
Linus Ekström
I dunno if this is still an issue but i found this to be very helpful when trying to do something similar.
http://world.episerver.com/Blogs/Alexander-Haneng/Dates/2012/7/How-to-define-properties-in-EPiServer-7---A-quick-reference/
You might want to check in this official documentation as well: http://world.episerver.com/Documentation/Items/Developers-Guide/EPiServer-CMS/75/Content/Properties/Property-types/