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

Add validation type attribute on ErrorDescription? #37

Open
ngonzalezpazFC opened this issue Jul 28, 2021 · 5 comments
Open

Add validation type attribute on ErrorDescription? #37

ngonzalezpazFC opened this issue Jul 28, 2021 · 5 comments

Comments

@ngonzalezpazFC
Copy link
Contributor

ValidationException can contain a list of error descriptions. In order to handle message errors, it should be useful to know which validation relates to each error description.

@ngonzalezpazFC ngonzalezpazFC added the question Further information is requested label Jul 28, 2021
@javier-godoy
Copy link
Member

There is a constructor that receives a field:
https://github.com/AppJars/commons-backend/blob/cc07f0892e0ca613803036fb2d639e47ce522ce9/commons-model/src/main/java/com/appjars/saturn/model/ErrorDescription.java#L42

Do we need a more general approach?

@ngonzalezpazFC
Copy link
Contributor Author

There is a constructor that receives a field:

https://github.com/AppJars/commons-backend/blob/cc07f0892e0ca613803036fb2d639e47ce522ce9/commons-model/src/main/java/com/appjars/saturn/model/ErrorDescription.java#L42

Do we need a more general approach?

I think I can store the validation class name in the field attribute

@javier-godoy
Copy link
Member

I think I can store the validation class name in the field attribute

Why do you need the validation class name?

@ngonzalezpazFC
Copy link
Contributor Author

ngonzalezpazFC commented Jul 29, 2021

I think I can store the validation class name in the field attribute

Why do you need the validation class name?

I thought of using the name of the class instead of using random strings, but given that the vaadin module does not have dependency of business-impl and cannot see the validators classes, I will use the following strings:

  • creation
  • deletion
  • update

@mlopezFC
Copy link
Member

I think I can store the validation class name in the field attribute

Why do you need the validation class name?

I thought of using the name of the class instead of using random strings, but given that the vaadin module does not have dependency of business-impl and cannot see the validators classes, I will use the following strings:

  • creation
  • deletion
  • update

Did you solve the issue by using those strings?

@mlopezFC mlopezFC added waiting-for-author and removed question Further information is requested labels Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants