Hi Atlassians,
I new to creating ConfiForm pages and was wondering how I can apply a validation rules to restrict the numbers that can be entered into a field. For instance,
I have an Age field (fieldname = myAge) and I want to ensure values under 0 cannot be entered. I tried adding validation rules to the field, such as the following:
myAge:>0
[entry.myAge]:>0
Neither have produced the correct results. Whether I enter a negative or positive value, the 'Message to show when validation fails' is shown.
Thanks in advance.
I think you want myAge:<0 ... this triggers the validation message when that condition is met.
And to be clear, this does not go in the "Validation rules" parameter for the myAge field itself. That parameter only provides a very limited set of validation rules, and in this case can just verify that it is a number.
Instead, add a separate Confiforms Rules for Field Definition macro (I think formerly known as Confiforms Field Definition Rules), which lets you use the much more versatile Filters.
Configure the macro as follows:
I believe raising this directly with ConfiForm support would get you the most appropriate answer.
You can contact their support here: https://marketplace.atlassian.com/apps/1211860/confiforms-data-forms-workflows?hosting=server&tab=support
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Going by this sample https://wiki.vertuna.com/plugins/servlet/mobile?contentId=3670269#content/view/3670269 which I believe is what you were following I will use 2 fields with the startdate replacement field’s value set to 1 and then the actual validation matching what is shown in the sample.
why 1? because you mentioned you font want zero included.
Why not enter the value directly?
I am not sure if it’s expected to take values directly hence parsing value for comparison via a field as per the linked sample.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.