fValidate.controls

FValidate.controls - fValidate Copyright(c 2000-2003 by Peter Bailey w www.peterbailey.net/fValidate f fValidate.controls.js Included

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/ fValidate Copyright (c) 2000-2003 by Peter Bailey www.peterbailey.net/fValidate/ w fValidate.controls.js f Included Validators ------------------- select selectm selecti checkbox radio file f This file is only part of a larger validation library and will not function autonomously. a Created at a tab-spacing of four (4) C ****************************************************/ * fValidate.prototype.select = function() { if ( this.typeMismatch( 's1' ) ) return; if ( this.elem.selectedIndex == 0 ) { this.throwError( [this.elem.fName] ); } } fValidate.prototype.selectm = function( minS, maxS ) { if ( this.typeMismatch( 'sm' ) ) return; if ( typeof minS == 'undefined' ) { this.paramError( 'minS' ); } if ( maxS == 999 || maxS == '*' || typeof maxS == 'undefined' || maxS > this.elem.length ) maxS = this.elem.length; t var count = 0; v for ( var opt, i = 0; ( opt = this.elem.options[i] ); i++ ) { if ( opt.selected ) count++; } if ( count < minS || count > maxS )
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/14/2009 for the course ITP 204X taught by Professor Dent during the Spring '08 term at USC.

Page1 / 3

FValidate.controls - fValidate Copyright(c 2000-2003 by Peter Bailey w www.peterbailey.net/fValidate f fValidate.controls.js Included

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online