...
List of validation methods
- required
- url
- date
- number
- digits
- creditcard
Validate Content Types
Simple add ftValidation to your Formtool Property with a comma separated list of validation requirements.
Example
Code Block |
---|
<cfcomponent name="superHero" extends="farcry.core.packages.types.types" output="false" displayname="Super Hero">
<cfproperty
name="title" type="string" hint="Super hero title." required="true"
ftSeq="1" ftValidation="required" ftFieldset="General Details" ftWizardStep="Teaser Information" ftLabel="Title" />
<cfproperty
name="mailaddress" type="string" hint="His Email"
ftSeq="2" ftValidation="required,email" ftFieldset="General Details" ftWizardStep="Teaser Information" ftLabel="Email Address" />
<cfproperty
name="homepage" type="string" hint="Homepage"
ftSeq="3" ftValidation="url" ftFieldset="General Details" ftWizardStep="Teaser Information" ftLabel="Homepage" />
<cfproperty
name="nbrOfSiblings" type="integer" hint="Siblings" default="0"
ftSeq="4" ftValidation="required,digits" ftFieldset="General Details" ftWizardStep="Teaser Information" ftLabel="Siblings" />
</cfcomponent>
|
Additional methods
There are additional methods like lettersonly or nowhitespace provided by the jQuery plugin which are not loaded by default.
You can register and load the javascript file when you want to use it.
...