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
|
Hi there, I need read access to the ValidationRule for a given ValidationError and I also need read access to the properties of that ValidationRule: LengthValidationRule: The Min and Max values RangeValidationRule: The Low and High values ComparisonValidationRule: The ComparisonOperator and Value Did I forget one? We need these values to create proper error messages since we don't use resource files for the translations. Regards, Sörnt |
|
|
You can use the Message property of the validation for this. Custom messages are formatted in just the same way as default messages e.g.
will produce the message:
|
|
|
Hi Ivan, I should have been more precisely. The customer want's to localize the messages via XML files. I transform the ValidationError objects into another object (since the Message property is readonly) the Rule property points to the error type, but the properties of these rules are marked as internal. It would be helpful if the "get" methods would be public in order to translate the error message. Regards, Sörnt |
|
|
Thanks for the update Sörnt, Thanks for clarifying, we'll have a talk internally about the best approach here and get back to you. Thanks! |
|
|
Thanks Soernt. Beginning with the next build, ValidationError will have a Rule property that you can use to access properties of the rule that triggered the error. Please let us know if you run into any problems. |
|