Hi all,
I built a form inside CCv6. There are some advanced settings possibilities. e.g. validation rules, extra attributes, .... How can I use them for a e.g. required input ?
Thx
Hi Arnold,
Here is an example of a validation rule:
required:This field is required
The extra attributes are for the field, you may for example want to set a data attribute:
data-myattr:some data here
class:some field class
Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Hi Max - can you give more examples of validation rules? For example how I would construct a custom datamask and a custom prompt to go with it?
Or is there a list I can see showing the different validation rules you support? And the same for the extra attributes field (and the correct syntax?)
Hi healyhatman,
The attributes can be anything, it will be added to the field tag, there are no specific "magical" attributes.
The validations rules are available in the "Text field" validation section already, the main function of the "Validations rules" box now is to use it for custom validations, an example on this can be found here:
https://www.chronoengine.com/faqs/74-chronoforms6/5293-validating-fields.html
Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
I suppose it was more how they're constructed. For anyone else that wants to know:
Validation Rules
rule[specifics]:prompt
examples:
regExp[/[0-9]{4}/]:Must be 4 digits.
length[3]:Must be at least 3 characters
Attributes
attribute:value or group:attribute:value
examples:
height:100px
style:color:blue
(edit reason: didn't include the delimiters for the regex)
Hey Max how about the "Validate data" action in the Setup tab? Any instructions for how that works, and a list of the validation rules supported?
Hi healyhatman,
The Validate Data has almost the same validation methods, this is the syntax:
field/required:this field is required
field/email:an email s required
Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
"Almost" the same validation methods? Can you please list all the validation methods supported, so I don't have to guess anymore?🙂
Dude! what's with the useless answers! he might as well tell you to google it, goshhhh
Thanks healyhatman for doing the "support's" work!🙂
Hi healyhatman,
Looking at the code - and I may not be looking in the right place - I can see these validations:
required
is_empty
no_spaces
match *
regex *
alpha *
alphanumeric *
digit *
nodigit *
number *
email
phone *
phone_inter *
url
Those with asterisks do not appear in the manual, but these do
is_integer
decimal
Bob
Dude! what's with the useless answers! he might as well tell you to google it, goshhhh
Later the "Validate fields" action was introduced and that one automatically applies the rules you have configured in your fields!
🙂Best regards
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
The only the ones that work are the 6 you can set with the sliders.
For me field validation is the most important part of a form.
Validation of alphanumeric input is the most important and unfortunately missing.
Rob
Hi Rob,
​
If you add a regex then it will be checked!
​
Best regards
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Hi Max,
My comment was on the post of Greyhead.
The validation rules he mentioned don't work.
Also the text area does not have a regex field.
Rob
Hi Rob,
​
Ok, there was a misunderstanding, what validation rules would you like to add/fix ?
​
I will add regex to the textarea!
​
Best regards
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
https://www.chronoengine.com/forums/posts/t106813/validate-data-action-and-settings?keywords=