foundeo / cfdocs

Repository for the cfdocs.org site.
https://cfdocs.org/
Other
180 stars 341 forks source link

isValid #1628

Closed rayvarner closed 5 months ago

rayvarner commented 11 months ago

isValid type option:

Docs should be updated to reflect that function/closure is an option for 'type'. I don't know if this is undocumented but it works in ACF and Lucee.

Function works in ACF and Lucee: isValid( "function", function(a,b) {return a+b;} );

Closure only works for Lucee: isValid( "closure", function(a,b) {return a+b;} );

pfreitag commented 11 months ago

cool, would be good to see if we can figure out what version of ACF/Lucee these were added to as well.

pfreitag commented 11 months ago

hmm - function is listed in ACF's docs already, and I tested it on trycf all engines seem to support it going back to Railo 4.2 and CF10 - so for that one I think it might have been there since CF7 and we just missed it.

rayvarner commented 11 months ago

Thanks for responding Pete. I'll try to get involved more with cfdocs; especially since they're THE best reference.

If you ever need a remote developer let me know. Thanks!

Ray http://www.linkedin.com/in/raymondvarner

On Tue, Sep 5, 2023 at 4:24 PM Pete Freitag @.***> wrote:

hmm - function is listed in ACF's docs already, and I tested it on trycf all engines seem to support it going back to Railo 4.2 and CF10 - so for that one I think it might have been there since CF7 and we just missed it.

— Reply to this email directly, view it on GitHub https://github.com/foundeo/cfdocs/issues/1628#issuecomment-1707262927, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4OSBBA7OBPHLUNSP5Q2H3XY6DBRANCNFSM6AAAAAA4MJD4EE . You are receiving this because you authored the thread.Message ID: @.***>

Xcreen commented 7 months ago

I added a PR to add "function" as type-parameter.
Also I tested with CF8, but "function" does not exists there.
So it must be added in CF9 or CF10.

Lucee also has many more types for the isValid-function, but many are also not documented in the lucee-docs, so it left them out (like closure). https://github.com/lucee/Lucee/blob/8bf7d08883e2077d6abd838517acb19d5acf767c/core/src/main/java/lucee/runtime/op/Decision.java#L997