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) => {
return [
minLength(parsed.header, value),
`header must not be shorter than ${value} characters, current length is ${
parsed.header.length
}`
];
};
export default (parsed, when, value) => {
const input = parsed.scope;
if (!input) {
return [true];
}
return [
minLength(input, value),
`scope must not be shorter than ${value} characters`
];
};
export default (parsed, when, value) => {
if (!parsed.footer) {
return [true];
}
return [
minLength(parsed.footer, value),
`footer must not be shorter than ${value} characters`
];
};
export default (parsed, when, value) => {
if (!parsed.body) {
return [true];
}
return [
minLength(parsed.body, value),
`body must not be shorter than ${value} characters`
];
};
export default (parsed, when, value) => {
const input = parsed.type;
if (!input) {
return [true];
}
return [
minLength(input, value),
`type must not be shorter than ${value} characters`
];
};
export default (parsed, when, value) => {
const input = parsed.subject;
if (!input) {
return [true];
}
return [
minLength(input, value),
`subject must not be shorter than ${value} characters`
];
};