nfdi4plants / arc-validate

Home of all the tools and libraries to create and run validation of ARCs
https://nfdi4plants.github.io/arc-validate/
MIT License
3 stars 2 forks source link

Add SatisfiesPredicate to Validate.Param and Validate.ParamCollection #91

Closed LibraChris closed 2 months ago

LibraChris commented 3 months ago

Introduce SatisfiesParameter as a validation method for Param and ParamCollection, alongside foundational tests for both functionalities.

omaus commented 3 months ago

Could it be that Validate.ParamCollection.SatisfiesParameter is the same like the function in this PR?: #88 🤔

LibraChris commented 3 months ago

Could it be that Validate.ParamCollection.SatisfiesParameter is the same like the function in this PR?: #88 🤔

No, since your function checks each element against a condition, while mine just checks if a certain function on the Params returns true. So, for example, using Seq.exist would return true if just one element of the ParamCollection matches.

omaus commented 3 months ago

Could it be that Validate.ParamCollection.SatisfiesParameter is the same like the function in this PR?: #88 🤔

Could it be that Validate.ParamCollection.SatisfiesParameter is the same like the function in this PR?: #88 🤔

No, since your function checks each element against a condition, while mine just checks if a certain function on the Params returns true. So, for example, using Seq.exist would return true if just one element of the ParamCollection matches.

Ah okay, I get it. Thx! 👍

kMutagene commented 2 months ago

Let's incorporate the spec validation directly into the lib, after dependency updates and this is merged 👍