You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Joken configuration now has a Joken.Claim struct which has a :options field. This came from the #182 PR. We could add custom messages, skipping the claim if some condition match and whatnot.
Ideas are welcome here.
The text was updated successfully, but these errors were encountered:
There is two ways we can implement optional claims:
pass nil or :not_defined atom into the validation function if claim is not defined at all. In this case the validation function will decide on the outcome.
add an optional: [claim1, claim2...]parameter into the :options in case we do not want to fail if some claim is not defined at all, if this claim is defined it will be still validated
On Joken 2 each claim might have its own options since now we use a "key" => %Joken.Claim{} config map. I think it is easier to add flags there. What do you say?
Joken configuration now has a
Joken.Claim
struct which has a:options
field. This came from the #182 PR. We could add custom messages, skipping the claim if some condition match and whatnot.Ideas are welcome here.
The text was updated successfully, but these errors were encountered: