Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fapi_validation
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
fapi_validation
Commits
0ecf6eef
Commit
0ecf6eef
authored
12 years ago
by
Pedro Faria
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1460690
by Gidgidonihah,barraponto,pedrofaria: Absolute URLS validation.
parent
30371b35
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fapi_validation.module
+3
-3
3 additions, 3 deletions
fapi_validation.module
with
3 additions
and
3 deletions
fapi_validation.module
+
3
−
3
View file @
0ecf6eef
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment