This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
The LightSpeed designer adds a const field to entities with the property name: /// <summary>Identifies the EmailAddress entity attribute.</summary> It would be nice if there was a designer option to add a similar const field to entities with the maximum length (when it is defined) so that it isn't duplicated. Old and busted: [StringLength(200)] New hotness: [StringLength(User.EmailAddressMaxLength)] |
|
|
Another option that I think might work would be to integrate with the MetaData dll and pull the value out at runtime. Unfortunatly I don't see a max length value on FieldInfo. Perhaps add it and add some sort of EntityFieldLength data annotation attribute at Mindscape.LightSpeed.Web that pulls that value out at runtime and validates. |
|