public/wordpress/wp-content/plugins/backupbuddy/pluginbuddy/classes/form.php
/*	pb_backupbuddy::test()
	 *	
	 *	Tests whether a form item's rules on a provided value. If no value is provided then will try to get the POST'ed value.
	 *	@see pb_backupbuddy::test_rule()
	 *	
	 *	@param		string		$name
	 *	@param		mixed		$value		Optional: This will be tested with the rule assigned to the form item with the provided name.
	 *										If empty we will try to test based on a submitted post value if it exists.
	 *	@return		true/array				true if the value passes; array of error messages on failure.
	 */


Tests whether a form item's rules on a provided value. If no value is provided then will try to get the POST'ed value.

@param          string          $name
@param          mixed           $value          Optional: This will be tested with the rule assigned to the form item with the provided name.
If empty we will try to test based on a submitted post value if it exists.
@return         true/array                              true if the value passes; array of error messages on failure.
Tests whether a form item ' s rules on a provided value . If no value is provided then will try to get the POST ' ed value . @param string $name @param mixed $value Optional : This will be tested with the rule assigned to the form item with the provided name . If empty we will try to test based on a submitted post value if it exists . @return true / array true if the value passes ; array of error messages on failure .
public function test( $name, $value = '' ) {
		if ( $value == '' ) { 
			if ( pb_backupbuddy::_POST( $this->_prefix . $name ) != '' ) { 
				$value = pb_backupbuddy::_POST( $this->_prefix . $name );
			}
		}
		if ( isset( $this->_inputs[$name]['rules'] ) ) {
			return self::test_rule( $this->_inputs[$name]['rules'], $value );
		} else { 
			return true;
		}
	}
public function test ( $ name , $ value = '' ) { if ( $ value == '' ) { if ( pb_backupbuddy :: _POST ( $ this -> _prefix . $ name ) != '' ) { $ value = pb_backupbuddy :: _POST ( $ this -> _prefix . $ name ) ; } } if ( isset ( $ this -> _inputs [ $ name ] [ 'rules' ] ) ) { return self :: test_rule ( $ this -> _inputs [ $ name ] [ 'rules' ] , $ value ) ; } else { return true ; } }
pb_backupbuddy::test()
pb_backupbuddy :: test ()
// No value, try to get it. // Submitted value exists, use it. //} else { // Nothing submitted, fail. //	return false; // No tests. Passed.