Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/validateurlsyntax.php File Reference

Go to the source code of this file.

Namespaces

namespace  moodlecore

Functions

 validateUrlSyntax ($urladdr, $options="")
 validateEmailSyntax ($emailaddr, $options="")
 validateFtpSyntax ($ftpaddr, $options="")

Function Documentation

validateEmailSyntax ( emailaddr,
options = "" 
)

About ValidateEmailSyntax(): This function uses the ValidateUrlSyntax() function to easily check the syntax of an email address. It accepts the same options as ValidateURLSyntax but defaults them for email addresses.

Usage: validateEmailSyntax( url_to_check[, options]) url_to_check - string - The url to check

options - string - A optional string of options to set which parts of the url are required, optional, or not allowed. Each option must be followed by a "+" for required, "?" for optional, or "-" for not allowed. See ValidateUrlSyntax() docs for option list.

The default options are changed to: s-H-S-E+F-u+P-a+I-p-f-q-r-

This only allows an address of "name@domain".

Examples: validateEmailSyntax('george@fakemail.com') validateEmailSyntax('mailto:george@fakemail.com', 's+') validateEmailSyntax('george@fakemail.com?subject=Hi%20George', 'q?') validateEmailSyntax('george@212.198.33.12', 'I?')

Author(s): Rod Apeldoorn - rod(at)canowhoopass(dot)com

Homepage: http://www.canowhoopass.com/

License: Copyright 2004 - Rod Apeldoorn

Released under same license as validateUrlSyntax(). For details, contact me.

Definition at line 377 of file validateurlsyntax.php.

Here is the call graph for this function:

validateFtpSyntax ( ftpaddr,
options = "" 
)

About ValidateFtpSyntax(): This function uses the ValidateUrlSyntax() function to easily check the syntax of an FTP address. It accepts the same options as ValidateURLSyntax but defaults them for FTP addresses.

Usage: validateFtpSyntax( url_to_check[, options]) url_to_check - string - The url to check

options - string - A optional string of options to set which parts of the url are required, optional, or not allowed. Each option must be followed by a "+" for required, "?" for optional, or "-" for not allowed. See ValidateUrlSyntax() docs for option list.

The default options are changed to: s?H-S-E-F+u?P?a+I?p?f?q-r-

Examples: validateFtpSyntax('ftp://netscape.com') validateFtpSyntax('moz:iesucks@netscape.com') validateFtpSyntax('ftp://netscape.com:2121/browsers/ns7/', 'u-')

Author(s): Rod Apeldoorn - rod(at)canowhoopass(dot)com

Homepage: http://www.canowhoopass.com/

License: Copyright 2004 - Rod Apeldoorn

Released under same license as validateUrlSyntax(). For details, contact me.

Definition at line 485 of file validateurlsyntax.php.

Here is the call graph for this function:

validateUrlSyntax ( urladdr,
options = "" 
)

BEGINNING OF validateUrlSyntax() function

Definition at line 170 of file validateurlsyntax.php.

Here is the caller graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations