Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default (parsed, when, value) => {
const input = parsed.subject;
if (!input) {
return [true];
}
return [
maxLength(input, value),
`subject must not be longer than ${value} characters`
];
};
export default (parsed, when, value) => {
const input = parsed.type;
if (!input) {
return [true];
}
return [
maxLength(input, value),
`type must not be longer than ${value} characters`
];
};
export default (parsed, when, value) => {
const input = parsed.body;
if (!input) {
return [true];
}
return [
maxLength(input, value),
`body must not be longer than ${value} characters`
];
};
export default (parsed, when, value) => {
const input = parsed.footer;
if (!input) {
return [true];
}
return [
maxLength(input, value),
`footer must not be longer than ${value} characters`
];
};
export default (parsed, when, value) => {
const input = parsed.scope;
if (!input) {
return [true];
}
return [
maxLength(input, value),
`scope must not be longer than ${value} characters`
];
};
export default (parsed, when, value) => {
return [
maxLength(parsed.header, value),
`header must not be longer than ${value} characters, current length is ${
parsed.header.length
}`
];
};