Whats up group? Nice to be here.
I love this framework.
I am new to it and going to ask some dumb questions. Hopefully not to dumb
Ok, I am using VT version 1.1 manually init().
I setup my configs and instantiate vt and save it into Di/1 framework like so.
<cfset var validatorconfig = { definitionPath="/thismodel/beans/", JSIncludes=false, resultPath="thismodel.ValidatorResult" }>
<cfset Application.thisFactory.addBean( "Validator", new ValidateThis.ValidateThis( validatorconfig ) )>
This works no issues.
My rules for this bean have 15 rules, each are required.
For a test i already have a bean and have my rules defined for it, my beans all live under the beans folder and have individual sub folders for each of them.
I have test data in my tables. and want to know why this is not working.
I grab an object
<cfset t = new thismodel.beans.volunteers.volunteer()>
<cfset v = t.get(350)>
<cfset vx = Application.thisFactory.getBean("Validator")>
<cfset v.setfname("this")>
<cfset v.setmname("should")>
<cfset v.setlname("fail")>
<cfset vr = vx.validate(theObject=v,context='create,update',debuggingMode='strict')>
If i dump the result memento the failures array is empty and the isSuccess is true.
Do i have to manually set it to false?
I just dont understand why this does not fail.
I have tried getting the bean from the db and creating a new one both give me a success validation. In both cases, the success should be a false because all of the fields in the bean are empty.
Thanks in advance for any advice.
Tim