diff --git a/badge-maker_lib_index.js.html b/badge-maker_lib_index.js.html index d993ecdceb..f4190fd780 100644 --- a/badge-maker_lib_index.js.html +++ b/badge-maker_lib_index.js.html @@ -117,13 +117,13 @@ module.exports = {
diff --git a/badge-maker_lib_xml.js.html b/badge-maker_lib_xml.js.html index d007d1ac44..75fdcc2676 100644 --- a/badge-maker_lib_xml.js.html +++ b/badge-maker_lib_xml.js.html @@ -132,13 +132,13 @@ module.exports = { escapeXml, stripXmlWhitespace, XmlElement, ElementList }
diff --git a/core_base-service_base-graphql.js.html b/core_base-service_base-graphql.js.html index 6d1c829838..efc7063dc1 100644 --- a/core_base-service_base-graphql.js.html +++ b/core_base-service_base-graphql.js.html @@ -130,13 +130,13 @@ export default BaseGraphqlService
diff --git a/core_base-service_base-json.js.html b/core_base-service_base-json.js.html index e7461c268a..4834d9e327 100644 --- a/core_base-service_base-json.js.html +++ b/core_base-service_base-json.js.html @@ -91,13 +91,13 @@ export default BaseJsonService
diff --git a/core_base-service_base-svg-scraping.js.html b/core_base-service_base-svg-scraping.js.html index ce6e1fd57c..7255ada7c4 100644 --- a/core_base-service_base-svg-scraping.js.html +++ b/core_base-service_base-svg-scraping.js.html @@ -127,13 +127,13 @@ export default BaseSvgScrapingService
diff --git a/core_base-service_base-xml.js.html b/core_base-service_base-xml.js.html index 6d3f56b662..29dae0256f 100644 --- a/core_base-service_base-xml.js.html +++ b/core_base-service_base-xml.js.html @@ -106,13 +106,13 @@ export default BaseXmlService
diff --git a/core_base-service_base-yaml.js.html b/core_base-service_base-yaml.js.html index 79b4d11394..ae3fa4a72c 100644 --- a/core_base-service_base-yaml.js.html +++ b/core_base-service_base-yaml.js.html @@ -109,13 +109,13 @@ export default BaseYamlService
diff --git a/core_base-service_base.js.html b/core_base-service_base.js.html index bd44795ab0..ced7506ec8 100644 --- a/core_base-service_base.js.html +++ b/core_base-service_base.js.html @@ -628,13 +628,13 @@ export default BaseService
diff --git a/core_base-service_errors.js.html b/core_base-service_errors.js.html index 9b6354dd77..04358c163d 100644 --- a/core_base-service_errors.js.html +++ b/core_base-service_errors.js.html @@ -255,13 +255,13 @@ export {
diff --git a/core_base-service_graphql.js.html b/core_base-service_graphql.js.html index 7e7a691e25..8a7101ba10 100644 --- a/core_base-service_graphql.js.html +++ b/core_base-service_graphql.js.html @@ -87,13 +87,13 @@ export { mergeQueries }
diff --git a/core_base-service_resource-cache.js.html b/core_base-service_resource-cache.js.html index 9b8858b837..a3049d1c1e 100644 --- a/core_base-service_resource-cache.js.html +++ b/core_base-service_resource-cache.js.html @@ -105,13 +105,13 @@ export { getCachedResource, clearResourceCache }
diff --git a/core_server_prometheus-metrics.js.html b/core_server_prometheus-metrics.js.html index 8e476907d2..72a21faa6a 100644 --- a/core_server_prometheus-metrics.js.html +++ b/core_server_prometheus-metrics.js.html @@ -121,13 +121,13 @@ export default class PrometheusMetrics {
diff --git a/core_server_server.js.html b/core_server_server.js.html index 95dfbf9e95..0afe8c64d7 100644 --- a/core_server_server.js.html +++ b/core_server_server.js.html @@ -630,13 +630,13 @@ export default Server
diff --git a/core_service-test-runner_create-service-tester.js.html b/core_service-test-runner_create-service-tester.js.html index c3bd30029f..da1a4d6ca4 100644 --- a/core_service-test-runner_create-service-tester.js.html +++ b/core_service-test-runner_create-service-tester.js.html @@ -68,13 +68,13 @@ export default createServiceTester
diff --git a/core_service-test-runner_icedfrisby-shields.js.html b/core_service-test-runner_icedfrisby-shields.js.html index 8f5652b487..01338df68f 100644 --- a/core_service-test-runner_icedfrisby-shields.js.html +++ b/core_service-test-runner_icedfrisby-shields.js.html @@ -140,13 +140,13 @@ export default factory
diff --git a/core_service-test-runner_runner.js.html b/core_service-test-runner_runner.js.html index 4a34b2eefc..366415f176 100644 --- a/core_service-test-runner_runner.js.html +++ b/core_service-test-runner_runner.js.html @@ -112,13 +112,13 @@ export default Runner
diff --git a/core_service-test-runner_service-tester.js.html b/core_service-test-runner_service-tester.js.html index 093f22f6af..c9a50867f3 100644 --- a/core_service-test-runner_service-tester.js.html +++ b/core_service-test-runner_service-tester.js.html @@ -178,13 +178,13 @@ export default ServiceTester
diff --git a/core_service-test-runner_services-for-title.js.html b/core_service-test-runner_services-for-title.js.html index a6de28d481..4f664cba22 100644 --- a/core_service-test-runner_services-for-title.js.html +++ b/core_service-test-runner_services-for-title.js.html @@ -69,13 +69,13 @@ export default servicesForTitle
diff --git a/core_token-pooling_token-pool.js.html b/core_token-pooling_token-pool.js.html index e196eba2e4..16b288347e 100644 --- a/core_token-pooling_token-pool.js.html +++ b/core_token-pooling_token-pool.js.html @@ -373,13 +373,13 @@ export { sanitizeToken, Token, TokenPool }
diff --git a/global.html b/global.html index 67ee9794f5..802b120b56 100644 --- a/global.html +++ b/global.html @@ -678,13 +678,13 @@
diff --git a/index.html b/index.html index 8b9271a32e..cb03f3ef40 100644 --- a/index.html +++ b/index.html @@ -214,13 +214,13 @@ under their terms and license.


diff --git a/module-badge-maker.html b/module-badge-maker.html index 412046e220..85afff38e9 100644 --- a/module-badge-maker.html +++ b/module-badge-maker.html @@ -423,13 +423,13 @@
diff --git a/module-badge-maker_lib_xml-ElementList.html b/module-badge-maker_lib_xml-ElementList.html index b37a4713d2..be4a11f0fa 100644 --- a/module-badge-maker_lib_xml-ElementList.html +++ b/module-badge-maker_lib_xml-ElementList.html @@ -157,13 +157,13 @@ like an XmlElement but renders multiple XML tags (not wrapped in a ).


diff --git a/module-badge-maker_lib_xml-XmlElement.html b/module-badge-maker_lib_xml-XmlElement.html index fb5c646c1d..0d2767c56c 100644 --- a/module-badge-maker_lib_xml-XmlElement.html +++ b/module-badge-maker_lib_xml-XmlElement.html @@ -468,13 +468,13 @@ element will be rendered as a self-closing element.


diff --git a/module-badge-maker_lib_xml.html b/module-badge-maker_lib_xml.html index f98f71707c..640f630f6f 100644 --- a/module-badge-maker_lib_xml.html +++ b/module-badge-maker_lib_xml.html @@ -122,13 +122,13 @@
diff --git a/module-core_base-service_base-BaseService.html b/module-core_base-service_base-BaseService.html index 6179802e29..dff4aa3073 100644 --- a/module-core_base-service_base-BaseService.html +++ b/module-core_base-service_base-BaseService.html @@ -809,13 +809,13 @@ defined in this.route.pattern or this.route.capture


diff --git a/module-core_base-service_base-graphql-BaseGraphqlService.html b/module-core_base-service_base-graphql-BaseGraphqlService.html index df5b1d9d2e..a660c39e83 100644 --- a/module-core_base-service_base-graphql-BaseGraphqlService.html +++ b/module-core_base-service_base-graphql-BaseGraphqlService.html @@ -823,13 +823,13 @@ an InvalidResponse.


diff --git a/module-core_base-service_base-graphql.html b/module-core_base-service_base-graphql.html index 2a38841b6e..0879569b6b 100644 --- a/module-core_base-service_base-graphql.html +++ b/module-core_base-service_base-graphql.html @@ -119,13 +119,13 @@
diff --git a/module-core_base-service_base-json-BaseJsonService.html b/module-core_base-service_base-json-BaseJsonService.html index 7c501da68c..5c7fd1fa70 100644 --- a/module-core_base-service_base-json-BaseJsonService.html +++ b/module-core_base-service_base-json-BaseJsonService.html @@ -668,13 +668,13 @@ This can be used to extend or override the
diff --git a/module-core_base-service_base-json.html b/module-core_base-service_base-json.html index 7e3d07d954..d6d4be51e2 100644 --- a/module-core_base-service_base-json.html +++ b/module-core_base-service_base-json.html @@ -119,13 +119,13 @@
diff --git a/module-core_base-service_base-svg-scraping-BaseSvgScrapingService.html b/module-core_base-service_base-svg-scraping-BaseSvgScrapingService.html index 0750b9d5e0..33c511cdba 100644 --- a/module-core_base-service_base-svg-scraping-BaseSvgScrapingService.html +++ b/module-core_base-service_base-svg-scraping-BaseSvgScrapingService.html @@ -759,13 +759,13 @@ This can be used to extend or override the
diff --git a/module-core_base-service_base-svg-scraping.html b/module-core_base-service_base-svg-scraping.html index 875909a08d..fa3dbb451c 100644 --- a/module-core_base-service_base-svg-scraping.html +++ b/module-core_base-service_base-svg-scraping.html @@ -119,13 +119,13 @@
diff --git a/module-core_base-service_base-xml-BaseXmlService.html b/module-core_base-service_base-xml-BaseXmlService.html index a86b8e8150..25c5280a61 100644 --- a/module-core_base-service_base-xml-BaseXmlService.html +++ b/module-core_base-service_base-xml-BaseXmlService.html @@ -551,13 +551,13 @@ This can be used to extend or override the
diff --git a/module-core_base-service_base-xml.html b/module-core_base-service_base-xml.html index 6ef61b0364..1a3e6b04ea 100644 --- a/module-core_base-service_base-xml.html +++ b/module-core_base-service_base-xml.html @@ -119,13 +119,13 @@
diff --git a/module-core_base-service_base-yaml-BaseYamlService.html b/module-core_base-service_base-yaml-BaseYamlService.html index d00fa44a96..092e7b8497 100644 --- a/module-core_base-service_base-yaml-BaseYamlService.html +++ b/module-core_base-service_base-yaml-BaseYamlService.html @@ -548,13 +548,13 @@ This can be used to extend or override the
diff --git a/module-core_base-service_base-yaml.html b/module-core_base-service_base-yaml.html index 02c653bc3d..aabf410dd6 100644 --- a/module-core_base-service_base-yaml.html +++ b/module-core_base-service_base-yaml.html @@ -119,13 +119,13 @@
diff --git a/module-core_base-service_base.html b/module-core_base-service_base.html index 507956eb22..9fa4f6988c 100644 --- a/module-core_base-service_base.html +++ b/module-core_base-service_base.html @@ -1202,13 +1202,13 @@ when the parameter is absent. (Note that in,
diff --git a/module-core_base-service_errors-Deprecated.html b/module-core_base-service_errors-Deprecated.html index b232cf4b0b..7da2e06adb 100644 --- a/module-core_base-service_errors-Deprecated.html +++ b/module-core_base-service_errors-Deprecated.html @@ -205,13 +205,13 @@
diff --git a/module-core_base-service_errors-ImproperlyConfigured.html b/module-core_base-service_errors-ImproperlyConfigured.html index 951e51e204..9d56b68702 100644 --- a/module-core_base-service_errors-ImproperlyConfigured.html +++ b/module-core_base-service_errors-ImproperlyConfigured.html @@ -205,13 +205,13 @@
diff --git a/module-core_base-service_errors-Inaccessible.html b/module-core_base-service_errors-Inaccessible.html index 891442ef19..7093f90e1a 100644 --- a/module-core_base-service_errors-Inaccessible.html +++ b/module-core_base-service_errors-Inaccessible.html @@ -206,13 +206,13 @@ or to wrap a 5XX response


diff --git a/module-core_base-service_errors-InvalidParameter.html b/module-core_base-service_errors-InvalidParameter.html index cc45c62150..4d0eb8df05 100644 --- a/module-core_base-service_errors-InvalidParameter.html +++ b/module-core_base-service_errors-InvalidParameter.html @@ -206,13 +206,13 @@ is invalid or unexpected


diff --git a/module-core_base-service_errors-InvalidResponse.html b/module-core_base-service_errors-InvalidResponse.html index f93150646c..c9675e1209 100644 --- a/module-core_base-service_errors-InvalidResponse.html +++ b/module-core_base-service_errors-InvalidResponse.html @@ -205,13 +205,13 @@
diff --git a/module-core_base-service_errors-NotFound.html b/module-core_base-service_errors-NotFound.html index 2ee48b6a5c..7aa2cd5791 100644 --- a/module-core_base-service_errors-NotFound.html +++ b/module-core_base-service_errors-NotFound.html @@ -205,13 +205,13 @@
diff --git a/module-core_base-service_errors-ShieldsRuntimeError.html b/module-core_base-service_errors-ShieldsRuntimeError.html index f557f9b324..d6217aa2cb 100644 --- a/module-core_base-service_errors-ShieldsRuntimeError.html +++ b/module-core_base-service_errors-ShieldsRuntimeError.html @@ -378,13 +378,13 @@ should override this method.


diff --git a/module-core_base-service_errors.html b/module-core_base-service_errors.html index 6ce6aa2303..93ee341aab 100644 --- a/module-core_base-service_errors.html +++ b/module-core_base-service_errors.html @@ -312,13 +312,13 @@ badge when we catch and render the exception (Optional)


diff --git a/module-core_base-service_graphql.html b/module-core_base-service_graphql.html index 5686fa1149..fcfebc5b2a 100644 --- a/module-core_base-service_graphql.html +++ b/module-core_base-service_graphql.html @@ -290,13 +290,13 @@ but can't use that due to incorrect packaging.


diff --git a/module-core_base-service_resource-cache.html b/module-core_base-service_resource-cache.html index ffe429bebd..3bcc35cb4c 100644 --- a/module-core_base-service_resource-cache.html +++ b/module-core_base-service_resource-cache.html @@ -562,13 +562,13 @@
diff --git a/module-core_server_server-Server.html b/module-core_server_server-Server.html index 274deebfcc..630b693297 100644 --- a/module-core_server_server-Server.html +++ b/module-core_server_server-Server.html @@ -675,13 +675,13 @@ Start listening for requests on this.baseUrl()


diff --git a/module-core_server_server.html b/module-core_server_server.html index 7fc69af3d2..d2cf35e7c4 100644 --- a/module-core_server_server.html +++ b/module-core_server_server.html @@ -119,13 +119,13 @@
diff --git a/module-core_service-test-runner_create-service-tester.html b/module-core_service-test-runner_create-service-tester.html index 98adaab7c2..bd27371067 100644 --- a/module-core_service-test-runner_create-service-tester.html +++ b/module-core_service-test-runner_create-service-tester.html @@ -230,13 +230,13 @@ service.


diff --git a/module-core_service-test-runner_icedfrisby-shields.html b/module-core_service-test-runner_icedfrisby-shields.html index b6315b59c8..084b44089a 100644 --- a/module-core_service-test-runner_icedfrisby-shields.html +++ b/module-core_service-test-runner_icedfrisby-shields.html @@ -286,13 +286,13 @@
diff --git a/module-core_service-test-runner_runner-Runner.html b/module-core_service-test-runner_runner-Runner.html index 0ea1a34753..0a3d477466 100644 --- a/module-core_service-test-runner_runner-Runner.html +++ b/module-core_service-test-runner_runner-Runner.html @@ -562,13 +562,13 @@ overridden on instances.


diff --git a/module-core_service-test-runner_runner.html b/module-core_service-test-runner_runner.html index c434c1f956..ade0ef6138 100644 --- a/module-core_service-test-runner_runner.html +++ b/module-core_service-test-runner_runner.html @@ -119,13 +119,13 @@
diff --git a/module-core_service-test-runner_service-tester-ServiceTester.html b/module-core_service-test-runner_service-tester-ServiceTester.html index cd12c84429..2322b6230a 100644 --- a/module-core_service-test-runner_service-tester-ServiceTester.html +++ b/module-core_service-test-runner_service-tester-ServiceTester.html @@ -1120,13 +1120,13 @@ the CLI, or directly on the tester.


diff --git a/module-core_service-test-runner_service-tester.html b/module-core_service-test-runner_service-tester.html index ffc7d58b12..31a9c7c84e 100644 --- a/module-core_service-test-runner_service-tester.html +++ b/module-core_service-test-runner_service-tester.html @@ -119,13 +119,13 @@
diff --git a/module-core_service-test-runner_services-for-title.html b/module-core_service-test-runner_services-for-title.html index a6d069861f..0d33350325 100644 --- a/module-core_service-test-runner_services-for-title.html +++ b/module-core_service-test-runner_services-for-title.html @@ -278,13 +278,13 @@ as an array of strings.


diff --git a/module-core_token-pooling_token-pool-Token.html b/module-core_token-pooling_token-pool-Token.html index 4865bd2926..152db1e40d 100644 --- a/module-core_token-pooling_token-pool-Token.html +++ b/module-core_token-pooling_token-pool-Token.html @@ -709,13 +709,13 @@ stable ordering for a valid priority queue.


diff --git a/module-core_token-pooling_token-pool-TokenPool.html b/module-core_token-pooling_token-pool-TokenPool.html index a4106aa6d3..ba8cf9159b 100644 --- a/module-core_token-pooling_token-pool-TokenPool.html +++ b/module-core_token-pooling_token-pool-TokenPool.html @@ -893,13 +893,13 @@ indicate it should not be reused.


diff --git a/module-core_token-pooling_token-pool.html b/module-core_token-pooling_token-pool.html index c894368192..0f8e932afd 100644 --- a/module-core_token-pooling_token-pool.html +++ b/module-core_token-pooling_token-pool.html @@ -285,13 +285,13 @@
diff --git a/module-services_build-status.html b/module-services_build-status.html index 4c4afbbe27..481654222b 100644 --- a/module-services_build-status.html +++ b/module-services_build-status.html @@ -447,13 +447,13 @@ Determines the message and color of the badge according to the build status.


diff --git a/module-services_color-formatters.html b/module-services_color-formatters.html index 87e4cfce1d..3236ca8d34 100644 --- a/module-services_color-formatters.html +++ b/module-services_color-formatters.html @@ -1526,13 +1526,13 @@ The color defaults to red if the score does not matches with any of the grade va
diff --git a/module-services_contributor-count.html b/module-services_contributor-count.html index 92dcde36b0..47ef244152 100644 --- a/module-services_contributor-count.html +++ b/module-services_contributor-count.html @@ -530,13 +530,13 @@ Determines the message and color of the badge according to the contributor count
diff --git a/module-services_downloads.html b/module-services_downloads.html index a6bbbe6cea..23739c2f70 100644 --- a/module-services_downloads.html +++ b/module-services_downloads.html @@ -540,13 +540,13 @@ this value as the prefix for versioned badges, e.g. foobar@v1.23. D
diff --git a/module-services_dynamic-common.html b/module-services_dynamic-common.html index dfceeffc34..06d5b32f9f 100644 --- a/module-services_dynamic-common.html +++ b/module-services_dynamic-common.html @@ -954,13 +954,13 @@ Sets the color of the badge to blue.


diff --git a/module-services_dynamic_json-path.html b/module-services_dynamic_json-path.html index c5bf32b4c5..8065935f86 100644 --- a/module-services_dynamic_json-path.html +++ b/module-services_dynamic_json-path.html @@ -417,13 +417,13 @@ This can be used to extend or override the
diff --git a/module-services_endpoint-common.html b/module-services_endpoint-common.html index dbdce69273..a3a64c1eca 100644 --- a/module-services_endpoint-common.html +++ b/module-services_endpoint-common.html @@ -804,13 +804,13 @@ Optionally it prints those keys in the message to provide detailed feedback.


diff --git a/module-services_licenses.html b/module-services_licenses.html index 438950fe2d..154d773e9c 100644 --- a/module-services_licenses.html +++ b/module-services_licenses.html @@ -644,13 +644,13 @@ Sets the badge color to the provided value, if not provided then the color is us
diff --git a/module-services_package-json-helpers.html b/module-services_package-json-helpers.html index ef28d92b06..ac05fd8be5 100644 --- a/module-services_package-json-helpers.html +++ b/module-services_package-json-helpers.html @@ -650,13 +650,13 @@ Checks if the object has all the dependency types and the dependency types are v
diff --git a/module-services_php-version.html b/module-services_php-version.html index 0b7934ef17..ad590fad8d 100644 --- a/module-services_php-version.html +++ b/module-services_php-version.html @@ -1466,13 +1466,13 @@ Return { numbers: [1,0,something big], modifier: 2, modifierCount: 1 }


diff --git a/module-services_pipenv-helpers.html b/module-services_pipenv-helpers.html index a0d3e63771..17d6d326c6 100644 --- a/module-services_pipenv-helpers.html +++ b/module-services_pipenv-helpers.html @@ -610,13 +610,13 @@ Checks if the lock file object has required properties and the properties are va
diff --git a/module-services_route-builder.html b/module-services_route-builder.html index e5f03a5eb8..088b68c9f2 100644 --- a/module-services_route-builder.html +++ b/module-services_route-builder.html @@ -615,13 +615,13 @@
diff --git a/module-services_steam_steam-base-BaseSteamAPI.html b/module-services_steam_steam-base-BaseSteamAPI.html index 8c023eff58..8f59d6a45f 100644 --- a/module-services_steam_steam-base-BaseSteamAPI.html +++ b/module-services_steam_steam-base-BaseSteamAPI.html @@ -374,13 +374,13 @@
diff --git a/module-services_steam_steam-base.html b/module-services_steam_steam-base.html index 1116b2a387..87138256b0 100644 --- a/module-services_steam_steam-base.html +++ b/module-services_steam_steam-base.html @@ -119,13 +119,13 @@
diff --git a/module-services_text-formatters.html b/module-services_text-formatters.html index ac2fa0fa22..7320a2bf92 100644 --- a/module-services_text-formatters.html +++ b/module-services_text-formatters.html @@ -1674,13 +1674,13 @@ The remaining stars are empty stars until the maximum number of stars is reached
diff --git a/module-services_validators.html b/module-services_validators.html new file mode 100644 index 0000000000..f504f1a165 --- /dev/null +++ b/module-services_validators.html @@ -0,0 +1,716 @@ + + + + + JSDoc: Module: services/validators + + + + + + + + + + +
+ +

Module: services/validators

+ + + + + + +
+ +
+ +
+ +
+
+ + +

This module contains commonly used validators.

+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

(static, constant) anyInteger :Joi

+ + + + +
+

Joi validator that checks if a value is a number, an integer and the value must be present.

+
+ + + +
Type:
+
    +
  • + +Joi + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static, constant) fileSize :Joi

+ + + + +
+

Joi validator for a file size we are going to pass to bytes.parse +see https://github.com/visionmedia/bytes.js#bytesparsestringnumber-value-numbernull

+
+ + + +
Type:
+
    +
  • + +Joi + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static, constant) nonNegativeInteger :Joi

+ + + + +
+

Joi validator that checks if a value is a number, an integer, greater than or equal to zero and the value must be present.

+
+ + + +
Type:
+
    +
  • + +Joi + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static, constant) optionalDottedVersionNClausesWithOptionalSuffix :Joi

+ + + + +
+

Joi validator that checks if a value is a string that matches a regular expression. +The regular expression matches strings that start with one or more digits, followed by zero or more groups of a dot and one or more digits, +followed by an optional suffix that starts with a dash or a plus sign and can contain any characters. +This validator can be used to validate properties that can be version strings with an optional suffix or absent. +For example, some valid values for this validator are: 1, 1.0, 1.0.0, 1.0.0-beta +Some invalid values for this validator are: abc, 1.a, 1.0-, .1

+
+ + + +
Type:
+
    +
  • + +Joi + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static, constant) optionalUrl :Joi

+ + + + +
+

Joi validator that checks if a value is a URL

+

TODO: This accepts URLs with query strings and fragments, which for some purposes should be rejected.

+
+ + + +
Type:
+
    +
  • + +Joi + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static, constant) semver :Joi

+ + + + +
+

Joi validator that checks if a value is a valid semantic versioning string and the value must be present.

+
+ + + +
Type:
+
    +
  • + +Joi + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static, constant) semverRange :Joi

+ + + + +
+

Joi validator that checks if a value is a valid semantic versioning range and the value must be present.

+
+ + + +
Type:
+
    +
  • + +Joi + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(inner, constant) optionalNonNegativeInteger :Joi

+ + + + +
+

Joi validator that checks if a value is a number, an integer, and greater than or equal to zero.

+
+ + + +
Type:
+
    +
  • + +Joi + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + + \ No newline at end of file diff --git a/services_build-status.js.html b/services_build-status.js.html index a13729e742..b3992640dc 100644 --- a/services_build-status.js.html +++ b/services_build-status.js.html @@ -134,13 +134,13 @@ export { isBuildStatus, renderBuildStatusBadge }
diff --git a/services_color-formatters.js.html b/services_color-formatters.js.html index 94e2f57731..078bd49d3a 100644 --- a/services_color-formatters.js.html +++ b/services_color-formatters.js.html @@ -234,13 +234,13 @@ export {
diff --git a/services_contributor-count.js.html b/services_contributor-count.js.html index aba30f7419..689c49c7a0 100644 --- a/services_contributor-count.js.html +++ b/services_contributor-count.js.html @@ -79,13 +79,13 @@ export { contributorColor, renderContributorBadge }
diff --git a/services_downloads.js.html b/services_downloads.js.html index a0c0590326..9c61ee5b4e 100644 --- a/services_downloads.js.html +++ b/services_downloads.js.html @@ -95,13 +95,13 @@ export { renderDownloadsBadge }
diff --git a/services_dynamic-common.js.html b/services_dynamic-common.js.html index 66c1664c00..4e006651a3 100644 --- a/services_dynamic-common.js.html +++ b/services_dynamic-common.js.html @@ -136,13 +136,13 @@ export {
diff --git a/services_dynamic_json-path.js.html b/services_dynamic_json-path.js.html index 2148dba0e1..c18997eb14 100644 --- a/services_dynamic_json-path.js.html +++ b/services_dynamic_json-path.js.html @@ -114,13 +114,13 @@ export default superclass =>
diff --git a/services_endpoint-common.js.html b/services_endpoint-common.js.html index 6b57034643..6f71d63665 100644 --- a/services_endpoint-common.js.html +++ b/services_endpoint-common.js.html @@ -142,13 +142,13 @@ export { validateEndpointData, fetchEndpointData }
diff --git a/services_licenses.js.html b/services_licenses.js.html index 0148576124..efb98942ef 100644 --- a/services_licenses.js.html +++ b/services_licenses.js.html @@ -195,13 +195,13 @@ export { licenseToColor, renderLicenseBadge }
diff --git a/services_package-json-helpers.js.html b/services_package-json-helpers.js.html index 7f53a51396..679ad4c609 100644 --- a/services_package-json-helpers.js.html +++ b/services_package-json-helpers.js.html @@ -114,13 +114,13 @@ export { isDependencyMap, isPackageJsonWithDependencies, getDependencyVersion }
diff --git a/services_packagist_packagist-base.js.html b/services_packagist_packagist-base.js.html index ce5ab7b259..b700773a6d 100644 --- a/services_packagist_packagist-base.js.html +++ b/services_packagist_packagist-base.js.html @@ -221,13 +221,13 @@ export {
diff --git a/services_php-version.js.html b/services_php-version.js.html index f3cc6b4be7..c16d665f17 100644 --- a/services_php-version.js.html +++ b/services_php-version.js.html @@ -335,13 +335,13 @@ export {
diff --git a/services_pipenv-helpers.js.html b/services_pipenv-helpers.js.html index cf5af8eee1..60e5196dab 100644 --- a/services_pipenv-helpers.js.html +++ b/services_pipenv-helpers.js.html @@ -122,13 +122,13 @@ export { isLockfile, getDependencyVersion }
diff --git a/services_route-builder.js.html b/services_route-builder.js.html index 811ac4dc61..2fd9e52be3 100644 --- a/services_route-builder.js.html +++ b/services_route-builder.js.html @@ -99,13 +99,13 @@ export default class RouteBuilder {
diff --git a/services_steam_steam-base.js.html b/services_steam_steam-base.js.html index 89178afd7b..97a347a5b4 100644 --- a/services_steam_steam-base.js.html +++ b/services_steam_steam-base.js.html @@ -92,13 +92,13 @@ export default BaseSteamAPI
diff --git a/services_test-validators.js.html b/services_test-validators.js.html index dc13f1ef8e..7b79d1edda 100644 --- a/services_test-validators.js.html +++ b/services_test-validators.js.html @@ -253,13 +253,13 @@ export {
diff --git a/services_text-formatters.js.html b/services_text-formatters.js.html index af2f2ba64c..2564642aba 100644 --- a/services_text-formatters.js.html +++ b/services_text-formatters.js.html @@ -246,13 +246,13 @@ export {
diff --git a/services_validators.js.html b/services_validators.js.html new file mode 100644 index 0000000000..ddba8ee98d --- /dev/null +++ b/services_validators.js.html @@ -0,0 +1,132 @@ + + + + + JSDoc: Source: services/validators.js + + + + + + + + + + +
+ +

Source: services/validators.js

+ + + + + + +
+
+
/**
+ * This module contains commonly used validators.
+ *
+ * @module
+ */
+
+import {
+  semver as joiSemver,
+  semverRange as joiSemverRange,
+} from 'joi-extension-semver'
+import joi from 'joi'
+const Joi = joi.extend(joiSemver).extend(joiSemverRange)
+
+/**
+ * Joi validator that checks if a value is a number, an integer, and greater than or equal to zero.
+ *
+ * @type {Joi}
+ */
+const optionalNonNegativeInteger = Joi.number().integer().min(0)
+
+export { optionalNonNegativeInteger }
+
+/**
+ * Joi validator that checks if a value is a number, an integer, greater than or equal to zero and the value must be present.
+ *
+ * @type {Joi}
+ */
+export const nonNegativeInteger = optionalNonNegativeInteger.required()
+
+/**
+ * Joi validator that checks if a value is a number, an integer and the value must be present.
+ *
+ * @type {Joi}
+ */
+export const anyInteger = Joi.number().integer().required()
+
+/**
+ * Joi validator that checks if a value is a valid semantic versioning string and the value must be present.
+ *
+ * @type {Joi}
+ */
+export const semver = Joi.semver().valid().required()
+
+/**
+ * Joi validator that checks if a value is a valid semantic versioning range and the value must be present.
+ *
+ * @type {Joi}
+ */
+export const semverRange = Joi.semverRange().valid().required()
+
+/**
+ * Joi validator that checks if a value is a string that matches a regular expression.
+ * The regular expression matches strings that start with one or more digits, followed by zero or more groups of a dot and one or more digits,
+ * followed by an optional suffix that starts with a dash or a plus sign and can contain any characters.
+ * This validator can be used to validate properties that can be version strings with an optional suffix or absent.
+ * For example, some valid values for this validator are: 1, 1.0, 1.0.0, 1.0.0-beta
+ * Some invalid values for this validator are: abc, 1.a, 1.0-, .1
+ *
+ * @type {Joi}
+ */
+export const optionalDottedVersionNClausesWithOptionalSuffix =
+  Joi.string().regex(/^\d+(\.\d+)*([-+].*)?$/)
+
+/**
+ * Joi validator that checks if a value is a URL
+ *
+ * TODO: This accepts URLs with query strings and fragments, which for some purposes should be rejected.
+ *
+ * @type {Joi}
+ */
+export const optionalUrl = Joi.string().uri({ scheme: ['http', 'https'] })
+
+/**
+ * Joi validator for a file size we are going to pass to bytes.parse
+ * see https://github.com/visionmedia/bytes.js#bytesparsestringnumber-value-numbernull
+ *
+ * @type {Joi}
+ */
+export const fileSize = Joi.string()
+  .regex(/^[0-9]+(b|kb|mb|gb|tb)$/i)
+  .required()
+
+
+
+ + + + +
+ + + +
+ + + + + + + diff --git a/tutorial-TUTORIAL.html b/tutorial-TUTORIAL.html index cecee747fe..96738649a1 100644 --- a/tutorial-TUTORIAL.html +++ b/tutorial-TUTORIAL.html @@ -371,13 +371,13 @@ will review your contribution.
diff --git a/tutorial-adding-new-config-values.html b/tutorial-adding-new-config-values.html index 4fb918ec53..b683357abb 100644 --- a/tutorial-adding-new-config-values.html +++ b/tutorial-adding-new-config-values.html @@ -54,13 +54,13 @@
diff --git a/tutorial-authentication.html b/tutorial-authentication.html index 641e903266..f3edff9c3a 100644 --- a/tutorial-authentication.html +++ b/tutorial-authentication.html @@ -42,13 +42,13 @@
diff --git a/tutorial-badge-urls.html b/tutorial-badge-urls.html index 8ccb88eaab..02f311abd1 100644 --- a/tutorial-badge-urls.html +++ b/tutorial-badge-urls.html @@ -77,13 +77,13 @@ badge is for issues, and the parameters are :user/:repo.
diff --git a/tutorial-code-walkthrough.html b/tutorial-code-walkthrough.html index 29decf827d..d75aec63b0 100644 --- a/tutorial-code-walkthrough.html +++ b/tutorial-code-walkthrough.html @@ -229,13 +229,13 @@ result over the HTTPS connection.
diff --git a/tutorial-deprecating-badges.html b/tutorial-deprecating-badges.html index d8d0245a4b..b111476078 100644 --- a/tutorial-deprecating-badges.html +++ b/tutorial-deprecating-badges.html @@ -136,13 +136,13 @@ t.create('no longer available (previously number of layers)')
diff --git a/tutorial-input-validation.html b/tutorial-input-validation.html index d9cda4bf7e..8366bf0dff 100644 --- a/tutorial-input-validation.html +++ b/tutorial-input-validation.html @@ -97,13 +97,13 @@
diff --git a/tutorial-json-format.html b/tutorial-json-format.html index 514a3500cb..936a8659a9 100644 --- a/tutorial-json-format.html +++ b/tutorial-json-format.html @@ -54,13 +54,13 @@ if you have any queries regarding the JSON format.


diff --git a/tutorial-logos.html b/tutorial-logos.html index 96540c59df..187fa5bc27 100644 --- a/tutorial-logos.html +++ b/tutorial-logos.html @@ -101,13 +101,13 @@
diff --git a/tutorial-performance-testing.html b/tutorial-performance-testing.html index 9acba06a9d..677d87fb72 100644 --- a/tutorial-performance-testing.html +++ b/tutorial-performance-testing.html @@ -70,13 +70,13 @@ node --prof-process --preprocess -j isolate-00000244AB6ED3B0-11920-v8.log | flam
diff --git a/tutorial-production-hosting.html b/tutorial-production-hosting.html index 7b95b0643a..ff97626668 100644 --- a/tutorial-production-hosting.html +++ b/tutorial-production-hosting.html @@ -211,13 +211,13 @@ via local-shields-io-production.yml (see Home

Modules

Classes

Tutorials

Global

+

Home

Modules

Classes

Tutorials

Global


diff --git a/tutorial-releases.html b/tutorial-releases.html index 98e6384620..76c6a8e582 100644 --- a/tutorial-releases.html +++ b/tutorial-releases.html @@ -73,13 +73,13 @@
diff --git a/tutorial-self-hosting.html b/tutorial-self-hosting.html index a8dd115136..91b5311d17 100644 --- a/tutorial-self-hosting.html +++ b/tutorial-self-hosting.html @@ -174,13 +174,13 @@ Set public.requireCloudflare: true.


diff --git a/tutorial-server-secrets.html b/tutorial-server-secrets.html index 1ccfbeb852..1a201b0299 100644 --- a/tutorial-server-secrets.html +++ b/tutorial-server-secrets.html @@ -288,13 +288,13 @@ and create an API key for the YouTube Data API v3.


diff --git a/tutorial-service-tests.html b/tutorial-service-tests.html index e466c35698..f7fed9ec16 100644 --- a/tutorial-service-tests.html +++ b/tutorial-service-tests.html @@ -240,13 +240,13 @@ comment there instead.


diff --git a/tutorial-static-badges.html b/tutorial-static-badges.html index e4f3fd19af..b5eb6267b2 100644 --- a/tutorial-static-badges.html +++ b/tutorial-static-badges.html @@ -45,13 +45,13 @@