Contents

// The below examples are each repeated twice. The first example
// will simply report valid or invalid, the second example will
// show what is returnred. The return value will change as you
// toggle the setCleanReturnValue() value. You can also toggle
// the setCleanMode() value to see how that will affect the results.

$Text = "This is a long
paragraph to verify that the
AllText filter accepts tabs and
newlines";
echo ($Validate->validateAllText($Text)) ? "Valid" : "Invalid"; // Valid because all characters are allowed

echo ($Validate->validateSameString(array(" string1 ", "string2 ", "string3"), array("string1", " string2", "string3"), 5, 2)) ? "Valid" : "Invalid"; // Valid because the values in the parallel array are the same AND each string is greater than 5 characters AND we are cleaning the values prior to validating