Skip to content
Snippets Groups Projects
Commit 0ecf6eef authored by Pedro Faria's avatar Pedro Faria
Browse files

Issue #1460690 by Gidgidonihah,barraponto,pedrofaria: Absolute URLS validation.

parent 30371b35
No related branches found
No related tags found
No related merge requests found
......@@ -161,7 +161,7 @@ function fapi_validation_fapi_validation_rules() {
),
'email' => array(
'callback' => 'fapi_validation_rule_email',
'error_msg' => t('The field %field not is a valid email.')
'error_msg' => t('%field not is a valid email.')
),
'length' => array(
'callback' => 'fapi_validation_rule_length',
......@@ -248,8 +248,8 @@ function fapi_validation_rule_length($value, $params) {
}
}
function fapi_validation_rule_url($value) {
return valid_url($value);
function fapi_validation_rule_url($value, $params = array()) {
return valid_url($value, !empty($params) && $params[0] == 'absolute');
}
function fapi_validation_rule_ipv4($value) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment