Page MenuHomeSealhub

simple-form-field.ts
No OneTemporary

Authored By
Unknown
Size
449 B
Referenced Files
None
Subscribers
None

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
application/javascript
Expires
Fri, Nov 27, 16:26 (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1201189
Default Alt Text
simple-form-field.ts (449 B)

Event Timeline