<<BACK    HOME    CNCPT    TTRL    JSsf.net/projects/validateformjs[ U | s | m | ? ]
   RQD dec eml int len mcr bss trm sifAll Concepts
   frm txt pwd txa rdo sl1 chk slmAll Object Types

validate_form.js
Concept: sMsgRequired

Make an element's value mandatory. Summary
sMsgRequired All Attributes
txt pwd txa rdo sl1 chk slm Interactive Example Code
Higher  [  trm RQD len dec eml int sif mcr bss  ]  Lower Precedence


[TOP]   sMsgRequired attribute: sMsgRequired        
Value Purpose The error message presented to the user when the value is not provided.
Value Rules Must be a string at least one character in length.
Object Compatibility text,  password,  textarea,  radio,  select-one,  checkbox,  select-multiple
Attribute Compatibility sMsgTxtDec,  sMsgTxtEmail,  sMsgTxtInt,  sMsgBadLength,  sMsgMCRange,  bsNoBadSubStrs,  asBadSubStrs,  sMsgBadSubStr,  bsDontTrimSpaces,  bsTrimSpaces,  sMsgTxtZip5,  sMsgTxtZip5p4,  sMsgTxtPhone7,  sMsgTxtPhone10,  sMsgTxtSsn















TOP     RQD dec eml int len mcr bss trm sif
<<BACK  TXT pwd txa rdo sl1 chk slm
Object Type Concept
text sMsgRequired

VF-Config Snippet f_orm.your_name.sMsgRequired = 'What is your name?';
Example Element <INPUT TYPE="text" NAME="your_name">

The form Change the vf-configuration
What is your name?
sMsgRequired
[[   DBG     ]]



TOP     RQD dec eml int len mcr bss trm sif
<<BACK  txt PWD txa rdo sl1 chk slm
Object Type Concept
password sMsgRequired

VF-Config Snippet f_orm.your_password.sMsgRequired = 'What is your password?';
Example Element <INPUT TYPE="password" NAME="your_password">

The form Change the vf-configuration
What is your password?
sMsgRequired
[[   DBG     ]]



TOP     RQD dec eml int len mcr bss trm sif
<<BACK  txt pwd TXA rdo sl1 chk slm
Object Type Concept
textarea sMsgRequired

VF-Config Snippet f_orm.your_paragraph.sMsgRequired = 'What is your paragraph?';
Example Element <TEXTAREA NAME="your_paragraph"></TEXTAREA>

The form Change the vf-configuration
What is your paragraph?
sMsgRequired
[[   DBG     ]]



TOP     RQD dec eml int len mcr bss trm sif
<<BACK  txt pwd txa RDO sl1 chk slm
Object Type Concept
radio sMsgRequired

VF-Config Snippet f_orm['favorite_station.sMsgRequired'] = 'What is your favorite radio station?';
Example Element <INPUT TYPE="radio"NAME="favorite_station"VALUE="99.5"> 99.5 WJBR
<INPUT TYPE="radio"NAME="favorite_station"VALUE="1060"> KYW News Radio 1060
<INPUT TYPE="radio"NAME="favorite_station"VALUE="90.9"> 90.9 WHYY National Public Radio

The form Change the vf-configuration
What is your favorite radio station?
      99.5 WJBR
      KYW News Radio 1060
      90.9 WHYY National Public Radio
sMsgRequired
[[   DBG     ]]



TOP     RQD dec eml int len mcr bss trm sif
<<BACK  txt pwd txa rdo SL1 chk slm
Object Type Concept
select-one sMsgRequired

VF-Config Snippet f_orm.favorite_food.sMsgRequired = 'What is your favorite food?';
Example Element <SELECT NAME="favorite_food">
   <OPTION VALUE="">-- SELECT ONE --</OPTION>
   <OPTION VALUE="aldos_pizza">Pizza from Aldo's Pizzarama</OPTION>
   <OPTION VALUE="ritas_lemon">Lemon water-ice from Rita's</OPTION>
   <OPTION VALUE="green_beans">Steamed green beans with a splash of lemon</OPTION>
</SELECT>

The empty string ('') value is required, in order to be 'not provided'. See the select-one 'Object Rules' for details.

The form Change the vf-configuration
What is your favorite food?
sMsgRequired
[[     [ CIBC CRSH ]   DBG     ]]



TOP     RQD dec eml int len mcr bss trm sif
<<BACK  txt pwd txa rdo sl1 CHK slm
Object Type Concept
checkbox sMsgRequired

VF-Config Snippet f_orm['movies_seen.sMsgRequired'] = 'What movies have you seen?';
Example Element <INPUT TYPE="checkbox"NAME="movies_seen"VALUE="bttf">Back To the Future
<INPUT TYPE="checkbox"NAME="movies_seen"VALUE="tmm">The Muppet Movie
<INPUT TYPE="checkbox"NAME="movies_seen"VALUE="mcv">My Cousin Vinnie

The form Change the vf-configuration
What movies have you seen?
      Back To the Future
      The Muppet Movie
      My Cousin Vinnie
sMsgRequired
[[   DBG     ]]



TOP     RQD dec eml int len mcr bss trm sif
<<BACK  txt pwd txa rdo sl1 chk SLM
Object Type Concept
select-multiple sMsgRequired

VF-Config Snippet f_orm.foods_eaten.sMsgRequired = 'What foods have you eaten?';
Example Element <SELECT NAME="foods_eaten"SIZE="3"MULTIPLE>
   <OPTION VALUE="aldos_pizza">Pizza from Aldo's Pizzarama</OPTION>
   <OPTION VALUE="ritas_lemon">Lemon water-ice from Rita's</OPTION>
   <OPTION VALUE="green_beans">Steamed green beans with a splash of lemon</OPTION>
</SELECT>

The form Change the vf-configuration
What foods have you eaten?
sMsgRequired
[[   DBG     ]]























SourceForge.net Logo

Copyright (C) 2003-2005, Jeff Epstein.   All rights reserved.