@@ -863,7 +863,6 @@ This validates that a string value is a valid JWT
863863
864864 Usage: jwt
865865
866-
867866# File
868867
869868This validates that a string value contains a valid file path and that
@@ -872,6 +871,15 @@ This is done using os.Stat, which is a platform independent function.
872871
873872 Usage: file
874873
874+ # Image path
875+
876+ This validates that a string value contains a valid file path and that
877+ the file exists on the machine and is an image.
878+ This is done using os.Stat and github.com/gabriel-vasile/mimetype
879+
880+ Usage: image
881+
882+ # URL String
875883
876884# File Path
877885
@@ -881,7 +889,6 @@ This is done using os.Stat, which is a platform independent function.
881889
882890 Usage: filepath
883891
884-
885892# URL String
886893
887894This validates that a string value contains a valid url
@@ -923,7 +930,6 @@ you can use this with the omitempty tag.
923930
924931 Usage: base64url
925932
926-
927933# Base64RawURL String
928934
929935This validates that a string value contains a valid base64 URL safe value,
@@ -934,7 +940,6 @@ you can use this with the omitempty tag.
934940
935941 Usage: base64url
936942
937-
938943# Bitcoin Address
939944
940945This validates that a string value contains a valid bitcoin address.
@@ -1267,7 +1272,6 @@ This is done using os.Stat, which is a platform independent function.
12671272
12681273 Usage: dir
12691274
1270-
12711275# Directory Path
12721276
12731277This validates that a string value contains a valid directory but does
@@ -1278,7 +1282,6 @@ may not exist at the time of validation.
12781282
12791283 Usage: dirpath
12801284
1281-
12821285# HostPort
12831286
12841287This validates that a string value contains a valid DNS hostname and port that
@@ -1350,42 +1353,38 @@ More information on https://semver.org/
13501353
13511354 Usage: semver
13521355
1353-
13541356# CVE Identifier
13551357
13561358This validates that a string value is a valid cve id, defined in cve mitre.
13571359More information on https://cve.mitre.org/
13581360
13591361 Usage: cve
13601362
1361-
13621363# Credit Card
13631364
13641365This validates that a string value contains a valid credit card number using Luhn algorithm.
13651366
13661367 Usage: credit_card
13671368
1368-
13691369# Luhn Checksum
13701370
1371- Usage: luhn_checksum
1371+ Usage: luhn_checksum
13721372
13731373This validates that a string or (u)int value contains a valid checksum using the Luhn algorithm.
13741374
13751375# MongoDb ObjectID
13761376
13771377This validates that a string is a valid 24 character hexadecimal string.
13781378
1379- Usage: mongodb
1380-
1379+ Usage: mongodb
13811380
13821381# Cron
13831382
13841383This validates that a string value contains a valid cron expression.
13851384
13861385 Usage: cron
13871386
1388- Alias Validators and Tags
1387+ # Alias Validators and Tags
13891388
13901389Alias Validators and Tags
13911390NOTE: When returning an error, the tag returned in "FieldError" will be
0 commit comments