src/org/ohmage/validator/UserValidators.java
public static Boolean validateNewAccountValue(final String value) 
			throws ValidationException {
		
		LOGGER.info("Validating that the value is a valid new account value.");
		
		if(StringUtils.isEmptyOrWhitespaceOnly(value)) {
			return null;
		}
		
		if(StringUtils.isValidBoolean(value.trim())) {
			return StringUtils.decodeBoolean(value.trim());
		}
		else {
			throw new ValidationException(
					ErrorCode.USER_INVALID_NEW_ACCOUNT_VALUE, 
					"The new account value is invalid: " + value);
		}
	}
/**
	 * Validates that a value is a valid new account value. If the value is 
	 * null or whitespace only, null is returned. If the value is a valid new 
	 * account value, it is returned. If the value is not null, not whitespace
	 * only, and not a valid new account value, a ValidationException is 
	 * thrown.
	 * 
	 * @param value The String representation of the new account value to be  
	 * 				validated.
	 * 
	 * @return Returns null if the value is null or whitespace only; otherwise,
	 * 		   the value is returned.
	 * 
	 * @throws ValidationException Thrown if the value is not null, not 
	 * 							   whitespace only, and not a valid new account 
	 * 							   value.
	 */
Validates that a value is a valid new account value. If the value is
null or whitespace only, null is returned. If the value is a valid new
account value, it is returned. If the value is not null, not whitespace
only, and not a valid new account value, a ValidationException is
thrown.

@param value The String representation of the new account value to be
validated.

@return Returns null if the value is null or whitespace only; otherwise,
the value is returned.

@throws ValidationException Thrown if the value is not null, not
whitespace only, and not a valid new account
value.
Validates that a value is a valid new account value . If the value is null or whitespace only null is returned . If the value is a valid new account value it is returned . If the value is not null not whitespace only and not a valid new account value a ValidationException is thrown . @param value The String representation of the new account value to be validated . @return Returns null if the value is null or whitespace only ; otherwise the value is returned . @throws ValidationException Thrown if the value is not null not whitespace only and not a valid new account value .
public static Boolean validateNewAccountValue(final String value) 
			throws ValidationException {
		LOGGER.info("Validating that the value is a valid new account value.");
		if(StringUtils.isEmptyOrWhitespaceOnly(value)) {
			return null;
		}
		if(StringUtils.isValidBoolean(value.trim())) {
			return StringUtils.decodeBoolean(value.trim());
		}
		else {
			throw new ValidationException(
					ErrorCode.USER_INVALID_NEW_ACCOUNT_VALUE, 
					"The new account value is invalid: " + value);
		}
	}
public static Boolean validateNewAccountValue ( final String value ) throws ValidationException { LOGGER . info ( "Validating that the value is a valid new account value." ) ; if ( StringUtils . isEmptyOrWhitespaceOnly ( value ) ) { return null ; } if ( StringUtils . isValidBoolean ( value . trim ( ) ) ) { return StringUtils . decodeBoolean ( value . trim ( ) ) ; } else { throw new ValidationException ( ErrorCode . USER_INVALID_NEW_ACCOUNT_VALUE , "The new account value is invalid: " + value ) ; } }
Validates that a value is a valid new account value.
Validates that a value is a valid new account value .