ocPortal Developer's Guide: Validation
» Return to ContentsValidation is one of the most important things in the battle against hackers, so ocPortal provides a full compliment of validation functions (most of them aren't in validation.php, though).
The functions in validation.php (shown here) are concerned with specific validations of input, rather than simple type checks.
sources/type_validation.php
Global_functions_type_validation.php
Function summary
| boolean | is_alphanumeric (string string) |
| boolean | is_valid_email_address (string string) |
boolean is_alphanumeric(string string)
Find whether the specified string is alphanumeric or not.
Parameters…
| Name | string |
|---|---|
| Description | The string to test |
| Type | string |
Returns…
| Description | Whether the string is alphanumeric or not |
|---|---|
| Type | boolean |
boolean is_valid_email_address(string string)
Find whether the specified address is a valid e-mail address or not.
Parameters…
| Name | string |
|---|---|
| Description | The string to test (Note: This is typed string, not e-mail, because it has to function on failure + we could make an infinite loop) |
| Type | string |
Returns…
| Description | Whether the string is an email address or not |
|---|---|
| Type | boolean |




0 reviews: Unrated (average)
There have been no comments yet