/************************************
fValidate.custom.js

Included Validators
-------------------
blank
email
************************************/
/*< blank basic *******************************************************************/
fValidate.prototype.blank = function()
{
  if ( this.typeMismatch( 'text' ) ) return;
  if ( this.isBlank() )
  {
    this.throwError( 'Please enter ' + this.elem.fName );
  }
}
/*/>*/

/*< email web *******************************************************************/
fValidate.prototype.email = function( level )
{
  if ( this.typeMismatch( 'text' ) ) return;
  if ( typeof level == 'undefined' ) level = 0;
  var emailPatterns = [
    /.+@.+\..+$/i,
    /^\w.+@\w.+\.[a-z]+$/i,
    /^\w[-_a-z~.]+@\w[-_a-z~.]+\.[a-z]{2}[a-z]*$/i,
    /^\w[\w\d]+(\.[\w\d]+)*@\w[\w\d]+(\.[\w\d]+)*\.[a-z]{2,7}$/i
    ];
  if ( ! emailPatterns[level].test( this.elem.value ) )
  {
    this.throwError( 'Please enter a valid email address' );
  }
}
/*/>*/

/*  EOF */