2022.2

Table Of Contents
l
Minimum length:Enteranumericalvaluefortheminimumcharacterlengthrequiredfor
thisfield.
l
Maximum length:Enteranumericalvaluefortheminimumcharacterlengthacceptedfor
thisfield.
l
Equal to:Usethedrop-downtoselectanotherfieldthatisalreadyaddedtothesame
Form.Thecontentsofbothfieldsmustmatchforthedatatobevalidated.Thisisusefulfor
confirmationfieldssuchasforpasswords,emailaddressesetc.
Whichoftheseoptionsareavailabledependsonthevalidationmethodoftheform:withBrowser
validationyoucanonlymakeafieldrequiredandsetamaximumlength.
Changing a Form's validation in HTML
InHTML,thevalidationmethodisstoredinthedata-validation-methodattributeofthe<form>element,
withthevalue"browser"or"jquery-validation".
AcustommessagetobeshownwhenvalidationofaparticularFormelementhasfailed,canbestored
inthedata-custom-messageattributeoftheFormelement,forexample:
<inputid="email1"name="email1"data-custom-message="Enteravalidemailaddress."type="email"
required="">
Validation in Connect 1.0.0
InConnect1.0.0,thevalidationmethodofthetemplatewasstoredusingthenames"standard"and
"custom".Standardhaschangedto"browser"andcustomisnow"jquery-validation".Whenyouopena
templatemadewiththatversionofthesoftware,thetemplatewillbemigratedtousethenewattribute
valuesforthedata-validation-methodattributeofthe<form>element.TheJavaScriptfileweb-form-val-
idation.jswillnotbemigrated:deletethatfileandthenchangetheForm'svalidationmethodtojQuery
Validation,asdescribedabove.WhenyouclickOK,thenewversionoftheweb-form-validation.jsfile
willbeadded.
SubmittingaForm
Whenaformissubmitted,byclickingortouchingtheSubmitbutton,thenameandvalueofformele-
mentsaresenttotheaddressthatisspecifiedintheForm'saction(see"AddingaForm"onpage640
or"ChangingaForm'sproperties"onpage642).Ifthenameattributeisomitted,thedataofthatinput
fieldwillnotbesentatall.
TheForm'svalidationshouldensurethatthedatathattheusersubmitsisvalid.
Form Elements
ThistopicliststheelementsthatcanbeaddedtoaforminaWebpageorinaCaptureOnTheGotem-
plateandexplainshowtoaddthemtoaForm,setadefaultvalueorchangetheirvalidation.Formore
Page 644