Hi,
I’m developing a web app using ActiveRecord, and started to use the validation on it, but I’m not sure on how to use it properly. The way I understand it, when you decorate some field with a validator, you can specify the message there, and then show it to the user, or use some predefined message from the framework. I can get the name of the property/field that generated the error(s). That’s ok, but I can’t get the type of the validation error, like if it was a IsUnique, or IsEmpty. I want to put all my messages into resources (not directly in the model definition), and set them in the business layer with some other validations that have to be done there. Is there any way I can do this? One other thing that I didn’t understand is how to use the localized messages from the framework, how should I link the satellite assembly from the Castle.Validator on my project to show them? My project does have the proper culture/country in the web.config, but I always see the standard English message… I’m using a trunk version from ActiveRecord that dates from 2009, so I don’t know if it has already changed. Regards, Leonardo Puglia Sócio/Diretor de Informática Pousada Villa das Pedras – Pirenópolis/GO www.villadaspedras.com <http://www.villadaspedras.com/> Fone: (61) 9559-4585 / 3364-0035 <mailto:[email protected]> [email protected] <mailto:[email protected]> [email protected] <mailto:[email protected]> [email protected] -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
