UNPKG

@allpepper/memory-bank-mcp

Version:

MCP server for remote management of project memory banks

17 lines (16 loc) 472 B
import { MissingParamError } from "../presentation/errors/index.js"; export class RequiredFieldValidator { fieldName; constructor(fieldName) { this.fieldName = fieldName; } validate(input) { if (!input || (input[this.fieldName] !== 0 && input[this.fieldName] !== false && !input[this.fieldName])) { return new MissingParamError(this.fieldName); } return null; } }