[Rt-commit] rt branch, ip-customfields, updated. rt-3.8.8-678-ge1b8c5f
Shawn Moore
sartak at bestpractical.com
Mon Sep 20 17:34:43 EDT 2010
The branch, ip-customfields has been updated
via e1b8c5f80b49037ca5df48f404c949fef518e930 (commit)
from fba6e6bd1961b312119c6714da71b8389bc5b52f (commit)
Summary of changes:
share/html/Elements/ValidateCustomFields | 4 ++--
t/customfields/ip.t | 2 +-
t/customfields/iprange.t | 2 +-
t/customfields/iprangev6.t | 2 +-
t/customfields/ipv6.t | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit e1b8c5f80b49037ca5df48f404c949fef518e930
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Mon Sep 20 14:08:59 2010 -0700
Better error messages for multiple IPs/ranges
diff --git a/share/html/Elements/ValidateCustomFields b/share/html/Elements/ValidateCustomFields
index 17f0d0e..b4072c7 100644
--- a/share/html/Elements/ValidateCustomFields
+++ b/share/html/Elements/ValidateCustomFields
@@ -88,7 +88,7 @@ while ( my $CF = $CustomFields->Next ) {
my $ip = RT::ObjectCustomFieldValue->ParseIP( $value );
unless ( $ip ) {
my $msg =
- loc( "Input can not be parsed to " . loc( $CF->Type ) );
+ loc( "Input can not be parsed as an IP address" );
$m->notes( ( 'InvalidField-' . $CF->Id ) => $msg );
push @res, $msg;
$valid = 0;
@@ -99,7 +99,7 @@ while ( my $CF = $CustomFields->Next ) {
RT::ObjectCustomFieldValue->ParseIPRange($value);
unless ( $start_ip && $end_ip ) {
my $msg =
- loc( "Input can not be parsed to " . loc( $CF->Type ) );
+ loc( "Input can not be parsed as an IP address range" );
$m->notes( ( 'InvalidField-' . $CF->Id ) => $msg );
push @res, $msg;
$valid = 0;
diff --git a/t/customfields/ip.t b/t/customfields/ip.t
index b13cd41..cd91e49 100644
--- a/t/customfields/ip.t
+++ b/t/customfields/ip.t
@@ -147,7 +147,7 @@ diag "check that we parse correct IPs only" if $ENV{'TEST_VERBOSE'};
}
);
- $agent->content_contains( 'can not be parsed to IPAddress',
+ $agent->content_contains( 'can not be parsed as an IP address',
'ticket fails to create' );
}
diff --git a/t/customfields/iprange.t b/t/customfields/iprange.t
index 52bfb2a..73ff6e2 100644
--- a/t/customfields/iprange.t
+++ b/t/customfields/iprange.t
@@ -198,7 +198,7 @@ diag "check that we parse correct IPs only" if $ENV{'TEST_VERBOSE'};
}
);
- $agent->content_like( qr/can not be parsed to IPAddressRange/, 'ticket fails to create' );
+ $agent->content_like( qr/can not be parsed as an IP address range/, 'ticket fails to create' );
}
}
diff --git a/t/customfields/iprangev6.t b/t/customfields/iprangev6.t
index 1af1897..63bfdc7 100644
--- a/t/customfields/iprangev6.t
+++ b/t/customfields/iprangev6.t
@@ -193,7 +193,7 @@ diag "check that we parse correct IPs only" if $ENV{'TEST_VERBOSE'};
}
);
- $agent->content_like( qr/can not be parsed to IPAddressRange/,
+ $agent->content_like( qr/can not be parsed as an IP address range/,
'ticket fails to create' );
}
diff --git a/t/customfields/ipv6.t b/t/customfields/ipv6.t
index ca3d242..f41c104 100644
--- a/t/customfields/ipv6.t
+++ b/t/customfields/ipv6.t
@@ -146,7 +146,7 @@ diag "check that we parse correct IPs only" if $ENV{'TEST_VERBOSE'};
}
);
- $agent->content_contains( 'can not be parsed to IPAddress',
+ $agent->content_contains( 'can not be parsed as an IP address',
'ticket fails to create' );
}
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list