Joining Two Rule Files

7 views
Skip to first unread message

Greg Moser

unread,
Dec 12, 2012, 3:11:45 PM12/12/12
to validate...@googlegroups.com
Hey All,

Was wondering if this was already avaiable in ValidateThis, and if not... how much it would take to add.  Imagine a situation where our Software comes with a default set of Validation rule files, however we would like for people to define their own ValidateThis rules file in XML and then merge the two rule files.  So the folder structure might look like this:

/Validation
  Account.xml.cfm
  Product.xml.cfm
  Order.xml.cfm
  /custom
      Product.xml.cfm

So basically if the file exists in the "custom" directory (in this case Product.xml.cfm) we want to add any rules from that custom file that don't already exist in the base file.

Thoughts?

-Greg

Matt Quackenbush

unread,
Dec 12, 2012, 3:19:23 PM12/12/12
to validate...@googlegroups.com
I've not looked at the XML guts of VT for quite some time, so I'm not sure whether or not it's already supported. That said, it's commonplace to support some sort of "import" mechanism where custom settings can be imported to override the standard settings. It sounds like that's your aim.

I'd recommend taking a peek at ColdSpring 1.2's import mechanism, because it supports it. I also wrote an import mechanism for ColdBox 2.x. I have no idea if that's still out there available anywhere these days (that was years ago, and ColdBox is 3.5+ now).

HTH



-Greg

--
You received this message because you are subscribed to the Google Groups "ValidateThis-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/validatethis-dev/-/aNi_Z9VaT34J.
To post to this group, send email to validate...@googlegroups.com.
To unsubscribe from this group, send email to validatethis-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/validatethis-dev?hl=en.

Sumit Verma

unread,
Dec 12, 2012, 3:47:11 PM12/12/12
to validate...@googlegroups.com
We can probably merge the xml files on application load, but it will be cool if this is supported in the core. I would imagine being able to specify a list of folders and then rules (if found) being merged in that order.


Sumit Verma
Partner / Vice President | ten24, LLC
office: 877.886.5806 x 103 | mobile: 617.290.8214
www.ten24web.com | www.linkedin.com/in/sverma | twitter: blogonria
Reply all
Reply to author
Forward
0 new messages