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

What's the field "value" in the validator customization for ? #1220

Open
bogeeee opened this issue Aug 12, 2024 · 3 comments
Open

What's the field "value" in the validator customization for ? #1220

bogeeee opened this issue Aug 12, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@bogeeee
Copy link

bogeeee commented Aug 12, 2024

Hi

From the Example here in the docs:

type Postfix<Value extends string> = typia.tags.TagBase<{
  kind: "postfix";
  target: "string";
  value: Value;
  validate: `$input.endsWith("${Value}")`;
}>;

The line:
value: Value; seems to be pretty meaningless to me. I don't see where it's for and when i change it to value: undefined;, it works the same way.

@samchon
Copy link
Owner

samchon commented Aug 20, 2024

It is a legacy spec. so that better to deprecate it.

@samchon samchon self-assigned this Aug 20, 2024
@samchon samchon added enhancement New feature or request good first issue Good for newcomers labels Aug 20, 2024
@bogeeee
Copy link
Author

bogeeee commented Aug 20, 2024

Do you mean only the value field is legacy ? I'm still relying on the TagBase feature or i'd need something similar in my project.

@samchon
Copy link
Owner

samchon commented Aug 20, 2024

The value property would be erased at v7 next major update.

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