Page MenuHomeSealhub

simple-form-field.ts
No OneTemporary

simple-form-field.ts

import { FieldParseResult, FormField } from "./field";
import { FormDataValue } from "../form";
import { BaseContext } from "koa";
export class SimpleFormField extends FormField<string | null> {
async parse(
_: BaseContext,
raw_value: FormDataValue
): Promise<FieldParseResult<string>> {
return {
parsed_value: (raw_value || "").toString(),
parsable: true,
error: null,
};
}
public getEmptyValue(): string {
return "";
}
}

File Metadata

Mime Type
text/x-java
Expires
Sat, Sep 20, 14:42 (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
949287
Default Alt Text
simple-form-field.ts (449 B)

Event Timeline