Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

Add containsKey tag #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add containsKey tag #58

wants to merge 1 commit into from

Conversation

jdanthinne
Copy link

When building forms (this is an example of the use of this tag, there can be many other), I usually tend to build a dictionary of validation errors as ["name_of_the_field": "This is the validation error to show"].
With this tag, when looping over my fields, I could just test if the dictionary contains a validation error for a given field with #if(containsKey(validationErrors, "name_of_the_field")) and then display the error if needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant