Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support FormData like query() #940

Closed
eve0415 opened this issue Jan 25, 2024 · 1 comment
Closed

Support FormData like query() #940

eve0415 opened this issue Jan 25, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@eve0415
Copy link

eve0415 commented Jan 25, 2024

Feature Request

Very much like #815 or #819, I would like to see the implementation with FormData.

INPUT:

{
  "input1": "foo",
  "input2": "15",
  "checkbox": "on",
  "arr": "a,b"
}
{
  "input1": "foo",
  "input2": "15",
  "arr": "a,b"
}

Make it be able to parse and validate against this interface:

interface MyForm {
  input1: string;
  input2: number;
  checkbox: boolean; // "on" means true, else false
  arr: string[];
}

if not

interface MyForm {
  input1: string;
  input2: string;
  checkbox?: "on";
  arr: string;
}

If this is out of scope, feel free to close it.

@samchon samchon self-assigned this Jan 31, 2024
@samchon samchon added enhancement New feature or request good first issue Good for newcomers labels Jan 31, 2024
@samchon
Copy link
Owner

samchon commented Jan 31, 2024

Got it, new function typia.http.assertFormData<T>(input: FormData): T would be newly added.

@samchon samchon closed this as completed in 4ca375e Feb 2, 2024
@samchon samchon reopened this Feb 2, 2024
@samchon samchon closed this as completed in 804a6e1 Feb 2, 2024
samchon added a commit that referenced this issue Feb 2, 2024
Fix #940 - bug on `HttpFormDataProgrammer.validator()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants