From f97144259335102c3d96b232cbb0af4970120d62 Mon Sep 17 00:00:00 2001 From: sarthurdev <965089+sarthurdev@users.noreply.github.com> Date: Mon, 10 Jan 2022 23:24:50 +0100 Subject: validators: T4144: Add error messages to the majority of IP validators --- src/validators/ip-address | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/validators/ip-address') diff --git a/src/validators/ip-address b/src/validators/ip-address index 51fb72c85..11d6df09e 100755 --- a/src/validators/ip-address +++ b/src/validators/ip-address @@ -1,3 +1,10 @@ #!/bin/sh ipaddrcheck --is-any-single $1 + +if [ $? -gt 0 ]; then + echo "Error: $1 is not a valid IP address" + exit 1 +fi + +exit 0 \ No newline at end of file -- cgit v1.2.3