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

customize message for validating input #733

Open
chinhtranvan opened this issue Apr 8, 2023 · 0 comments · May be fixed by #863
Open

customize message for validating input #733

chinhtranvan opened this issue Apr 8, 2023 · 0 comments · May be fixed by #863
Labels
Enhancement New feature or request
Milestone

Comments

@chinhtranvan
Copy link

Hi,

I have an interesting problem,

class MyDto : public oatpp::DTO {

DTO_INIT(MyDto, DTO)

DTO_FIELD(String, abc);
DTO_FIELD(Int32, def);

static oatpp:object....{
auto dto = createShared();
return dto
}
};

If user inserts wrong type input, is there anyway we can customize message instead of OAT internal message error? e.g. if user insert string type for def, we can show a message "def should be integer format" instead of "ERROR_INVALID_INTEGER"

@lganzzzo lganzzzo added the Enhancement New feature or request label Apr 12, 2023
@lganzzzo lganzzzo added this to To do in oat++ project via automation Apr 12, 2023
@lganzzzo lganzzzo added this to the 1.4.0 milestone Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
oat++ project
  
To do
Development

Successfully merging a pull request may close this issue.

2 participants