Hello. Running Lucee 6. Trying to pass an `attribu...
# cfml-general
p
Hello. Running Lucee 6. Trying to pass an
attributeCollection
struct to the BIF
isValid()
fails... ? Would anyone have any clue why? Thanks. p.s. also tried with
argumentCollection
, which also fails, but from what I understood in past, it should be attributeCollection... Example:
Copy code
var args = {"pattern":"^\s*\d+\s*$","type":"regex","value":"1"};
dump( isValid(attributeCollection=args) ); // crashes with "Too few arguments in function [isValid]"
c
It should be
argumentCollection
for BIFs and
attributeCollection
for tags. But contrary to what the docs claim, it seems that this feature has yet to be implemented. The example in the docs does work because `writeLog()`is just a wrapper for the equivalent tag. It seems there are about a dozen such BIFs where you can pass
argumentCollection
because they are actually implemented in CFML. I haven't checked them all but the vast majority written in java - including
isValid()
- apparently don't yet support this.
👍 1
p
Thanks for checking it out and writing back. Appreciated. I've written a wrapper function around isValid() (i.e.
isValidInHouse()
) to accommodate my needs. Not ideal, but works ;)
👍 1