c# - NHibernate Validator Dynamic rules -


i'm using nhibernate , have requirement validation rules must change in time. framework i'll use nhibernate validator, don't know how make dynamic rules, validation quite simple xml files or attributes in entity class, catch make rules updatable. there way achieve this?

well, since nobody answered i'll explain how can achieved. can done special attributes within class [email] [notnull] [notempty] etc, , can changed/overridden xml files. in configuration file of nhibernate validator add tags each 1 of classes should controled this:

<mapping file="path.to.xml.validation.file"> 

and change default_validator_mode property overrideattributewithexternal

hope helps :)


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -