@graphcms/validation
Advanced tools
Comparing version 1.2.7 to 1.2.8
@@ -15,2 +15,14 @@ import * as yup from 'yup'; | ||
/** | ||
* Matcher for field api IDs for the reverse relation side: | ||
* | ||
* .string() -> Ensures that only strings can be validated with success | ||
* .typeError(:string)-> Ensures that types other than string return false | ||
* .strict(:boolean) -> Prevents manipulation of the string during validation | ||
* .min() -> Sets minimum required length of string to 1 character | ||
* .max() -> Sets maximum required length of string to 64 characters | ||
* .test() -> Executes an arbitrary test on the input value | ||
* .matches(:RegExpr) -> Matches the input value against a regular expression | ||
*/ | ||
export declare const reverseRelationFieldApiId: yup.StringSchema; | ||
/** | ||
* Matcher for field display names: | ||
@@ -17,0 +29,0 @@ * |
@@ -69,18 +69,3 @@ var yup = require('yup'); | ||
var apiId$1 = yup.string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').strict(true).min(1, 'The API ID of a field must be at least one character long.').test({ | ||
name: 'max-length', | ||
test: function (value) { | ||
if (!value) | ||
return true; | ||
var options = this.options; | ||
var max = 32; | ||
if (options.context && options.context.allowLongApiIds) { | ||
max = 64; | ||
} | ||
if (value.length >= max) { | ||
return yup.ValidationError("The API ID of a field may not exceed " + max + " characters.", value, ''); | ||
} | ||
return true; | ||
} | ||
}).test({ | ||
var apiId$1 = yup.string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').strict(true).min(1, 'The API ID of a field must be at least one character long.').max(32, 'The API ID of a field may not exceed 32 characters.').test({ | ||
name: 'no-graphql-type', | ||
@@ -108,2 +93,3 @@ test: function (value) { | ||
}).matches(/^[a-z][a-zA-Z0-9]*$/, 'The API ID of a field may only start with a lowercase letter and contain alphanumeric characters.'); | ||
var reverseRelationFieldApiId = apiId$1.concat(yup.string().max(64, 'The API ID of a field may not exceed 64 characters.')); | ||
var displayName$1 = yup.string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').strict(true).min(1, 'The display name of a field must be at least one character long.').test('no-letter', 'The display name of a field should contain at least one non-whitespace character', function (value) { | ||
@@ -127,2 +113,3 @@ if (!value) { | ||
apiId: apiId$1, | ||
reverseRelationFieldApiId: reverseRelationFieldApiId, | ||
displayName: displayName$1, | ||
@@ -129,0 +116,0 @@ description: description$2, |
@@ -1,2 +0,2 @@ | ||
import { string, ValidationError, boolean } from 'yup'; | ||
import { string, boolean } from 'yup'; | ||
@@ -72,18 +72,3 @@ var name = string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').strict(true).min(1).ensure().trim('The name of an authentication token may not start or end with white space characters.'); | ||
var apiId$1 = string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').strict(true).min(1, 'The API ID of a field must be at least one character long.').test({ | ||
name: 'max-length', | ||
test: function (value) { | ||
if (!value) | ||
return true; | ||
var options = this.options; | ||
var max = 32; | ||
if (options.context && options.context.allowLongApiIds) { | ||
max = 64; | ||
} | ||
if (value.length >= max) { | ||
return ValidationError("The API ID of a field may not exceed " + max + " characters.", value, ''); | ||
} | ||
return true; | ||
} | ||
}).test({ | ||
var apiId$1 = string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').strict(true).min(1, 'The API ID of a field must be at least one character long.').max(32, 'The API ID of a field may not exceed 32 characters.').test({ | ||
name: 'no-graphql-type', | ||
@@ -111,2 +96,3 @@ test: function (value) { | ||
}).matches(/^[a-z][a-zA-Z0-9]*$/, 'The API ID of a field may only start with a lowercase letter and contain alphanumeric characters.'); | ||
var reverseRelationFieldApiId = apiId$1.concat(string().max(64, 'The API ID of a field may not exceed 64 characters.')); | ||
var displayName$1 = string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').strict(true).min(1, 'The display name of a field must be at least one character long.').test('no-letter', 'The display name of a field should contain at least one non-whitespace character', function (value) { | ||
@@ -125,3 +111,3 @@ if (!value) { | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZpZWxkLnRzKG9yaWdpbmFsKSJdLCJuYW1lcy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gpICAgICAgICAgIC0+IFRyYW5zZm9ybXMgdGhlIHZhbHVlcyBcInVuZGVmaW5lZFwiIGFuZCBcIm51bGxcIiBpbnRvIGVtcHR5IHN0cmluZ3NcclxuICovXHJcbmV4cG9ydCB2YXIgZGVzY3JpcHRpb24gPSB5dXBcclxuICAgIC5zdHJpbmcoKVxyXG4gICAgLnR5cGVFcnJvcignVGhlIHN1cHBsaWVkIHZhbHVlIFwiJHt2YWx1ZX1cIiBvZiB0eXBlIFwiJHt0eXBlfVwiIGlzIG5vdCBjb21wYXRpYmxlIHdpdGggdHlwZSBcInN0cmluZ1wiIScpXHJcbiAgICAuZW5zdXJlKCk7XHJcbmV4cG9ydCB2YXIgaXNMaXN0ID0geXVwXHJcbiAgICAuYm9vbGVhbigpXHJcbiAgICAuc3RyaWN0KHRydWUpXHJcbiAgICAudHlwZUVycm9yKCdUaGUgc3VwcGxpZWQgdmFsdWUgXCIke3ZhbHVlfVwiIG9mIHR5cGUgXCIke3R5cGV9XCIgaXMgbm90IGNvbXBhdGlibGUgd2l0aCB0eXBlIFwiYm9vbGVhblwiIScpO1xyXG4iXX0= | ||
@@ -131,2 +117,3 @@ | ||
apiId: apiId$1, | ||
reverseRelationFieldApiId: reverseRelationFieldApiId, | ||
displayName: displayName$1, | ||
@@ -133,0 +120,0 @@ description: description$2, |
@@ -76,18 +76,3 @@ (function (global, factory) { | ||
var apiId$1 = yup.string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').strict(true).min(1, 'The API ID of a field must be at least one character long.').test({ | ||
name: 'max-length', | ||
test: function (value) { | ||
if (!value) | ||
return true; | ||
var options = this.options; | ||
var max = 32; | ||
if (options.context && options.context.allowLongApiIds) { | ||
max = 64; | ||
} | ||
if (value.length >= max) { | ||
return yup.ValidationError("The API ID of a field may not exceed " + max + " characters.", value, ''); | ||
} | ||
return true; | ||
} | ||
}).test({ | ||
var apiId$1 = yup.string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').strict(true).min(1, 'The API ID of a field must be at least one character long.').max(32, 'The API ID of a field may not exceed 32 characters.').test({ | ||
name: 'no-graphql-type', | ||
@@ -115,2 +100,3 @@ test: function (value) { | ||
}).matches(/^[a-z][a-zA-Z0-9]*$/, 'The API ID of a field may only start with a lowercase letter and contain alphanumeric characters.'); | ||
var reverseRelationFieldApiId = apiId$1.concat(yup.string().max(64, 'The API ID of a field may not exceed 64 characters.')); | ||
var displayName$1 = yup.string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').strict(true).min(1, 'The display name of a field must be at least one character long.').test('no-letter', 'The display name of a field should contain at least one non-whitespace character', function (value) { | ||
@@ -129,3 +115,3 @@ if (!value) { | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZpZWxkLnRzKG9yaWdpbmFsKSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxZQUFZLFNBQVM7QUFDckIsUUFBUyxrQkFBa0IsMEJBQTJCO0FBWXRELE9BQU8sR0FBQSxDQUFJLFFBQVEsR0FBQSxDQUNkLE1BRGMsRUFBQSxDQUVkLFNBRmMsQ0FFSix3RkFGSSxDQUdkLE1BSGMsQ0FHUCxLQUhPLENBSWQsR0FKYyxDQUlWLEdBQUcsNkRBSk8sQ0FLZCxJQUxjLENBS1Q7SUFDTixNQUFNLFlBREEsQ0FBQTtJQUVOLE1BQU0sVUFBVSxPQUFPO1FBQ25CLElBQUksQ0FBQztZQUNELE9BQU87UUFDWCxHQUFBLENBQUksVUFBVSxJQUFBLENBQUs7UUFDbkIsR0FBQSxDQUFJLE1BQU07UUFDVixJQUFJLE9BQUEsQ0FBUSxPQUFSLENBQUEsRUFBQSxDQUFtQixPQUFBLENBQVEsT0FBUixDQUFnQixpQkFBaUI7WUFDcEQsR0FBQSxDQUFBLENBQUEsQ0FBTTtRQUNsQjtRQUNRLElBQUksS0FBQSxDQUFNLE1BQU4sQ0FBQSxFQUFBLENBQWd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XG4iXX0= | ||
@@ -135,2 +121,3 @@ | ||
apiId: apiId$1, | ||
reverseRelationFieldApiId: reverseRelationFieldApiId, | ||
displayName: displayName$1, | ||
@@ -137,0 +124,0 @@ description: description$2, |
{ | ||
"name": "@graphcms/validation", | ||
"version": "1.2.7", | ||
"version": "1.2.8", | ||
"main": "dist/validation.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
587412
1104