import { Field } from "./Field.js"; import { ValidationError } from "../ValidationError.js"; export class ConstantField extends Field { separator = "="; constructor(key, value) { super(key); this.value = value; } validate(value) { if (this.value !== value) throw new ValidationError(`Field ${this.key} must be "${this.value}"`) } getInputValue() { return this.value; } }