orpc-form-data-helpers
Utilities for parsing form data and handling validation errors with bracket notation support.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Utilities for parsing form data and handling validation errors with bracket notation support.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Quick reference for Better Notify configuration, patterns, and common gotchas
Interactive setup wizard for adding Better Notify to a TypeScript/JavaScript project
Context and API guidance for Better Notify — end-to-end typed notification infrastructure for Node.js
Seamlessly use AI SDK inside your oRPC projects without any extra overhead.
Use oRPC inside an Astro project.
Functions to encode and decode base64url strings (URL-safe variant of base64).
| name | oRPC Form Data Helpers |
| description | Utilities for parsing form data and handling validation errors with bracket notation support. |
| license | MIT |
| metadata | {"author":"Ali Torki","homepage":"https://github.com/ali-master","version":"1.0.0"} |
Form data helpers provide utilities for parsing HTML form data and extracting validation error messages, with full support for bracket notation.
parseFormDataimport { parseFormData } from '@orpc/openapi-client/helpers'
const form = new FormData()
form.append('name', 'John')
form.append('user[email]', 'john@example.com')
form.append('user[hobbies][]', 'reading')
form.append('user[hobbies][]', 'gaming')
const parsed = parseFormData(form)
// {
// name: 'John',
// user: {
// email: 'john@example.com',
// hobbies: ['reading', 'gaming']
// }
// }
getIssueMessageimport { getIssueMessage } from '@orpc/openapi-client/helpers'
const error = {
data: {
issues: [
{ path: ['user', 'email'], message: 'Invalid email format' }
]
}
}
const emailError = getIssueMessage(error, 'user[email]')
// 'Invalid email format'
const tagError = getIssueMessage(error, 'user[tags][]')
const anyError = getIssueMessage('anything', 'path')
// undefined if cannot find issue
getIssueMessagerequires standard schema issue format with issues indata.issues.
import { getIssueMessage, parseFormData } from '@orpc/openapi-client/helpers'
export function ContactForm() {
const [error, setError] = useState()
const handleSubmit = (form: FormData) => {
try {
const data = parseFormData(form)
} catch (error) {
setError(error)
}
}
return (
<form action={handleSubmit}>
<input name="user[name]" type="text" />
<span>{getIssueMessage(error, 'user[name]')}</span>
<input name="user[emails][]" type="email" />
<span>{getIssueMessage(error, 'user[emails][]')}</span>
<button type="submit">Submit</button>
</form>
)
}