I’m facing a challenge with implementing custom validation rules on an input field in my “invite new user” form. I have a field where the user can choose to grant access to different modules in my application. However, due to my licensing model, I have a restriction that allows up to 10 users on one of the modules.
Specifically, I’m wondering how I can prevent the user from adding more than 10 users for a particular module.
Does anyone of you have experience implementing custom validation rules for such
I think this is a UX question. I would suggest that when 10 people have already been invited you hide the form and show a message like your plan is capped to 10 users, upgrade for more".
To achieve this you could have a custom state on the page with 2 values: invite_opened / invite_blocked.
Then conditionally show/hide the form/message based on the value of that state.
You could use the “Do when condition is true” “Just once” to trigger the state change.
Yes, that was a good idea. However, I have two levels. They can invite 10 users to the main solution. But in some cases, my customers may have, for example, only 5 extra licenses for an additional module. Only 5 of the users should have access to this module.
They are free to move the 5 licenses among 5 different employees, but never more than 5.
In this case, the user limit is 10, but the extra module limit is 5. For this reason, I thought it would be better to impose an invalid condition on the assignment of this module. This way, they can still invite up to 10 users even if the 5 module licenses are used up.
If you want to be able to switch the licenses between different users I would suggest to have a screen to manage licenses for each module. In this screen you could display who are the 5 people assigned to the 5 licenses and switch them around from here.
Something like this