Announcement Announcement Module
Collapse
No announcement yet.
Validating field that is not part of formObject Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Validating field that is not part of formObject

    Hi out there,

    I would like to know how to validate a field that is not part of formObject.
    I have a formObject of type class User. I use a conversation to request that user information from the end-user. I am now adding an extra field to the form. That is a security code field, which needs to filled with the the code as displayed with an image on that same form web page. That part has been taken care of properly.

    I also validate the user information and display error messages about, among others, missing information properly.
    The validator automatically gets two arguments from the bindAndValidate method when called: an instance of the formObejct class type and an Error instance.

    I want to also validate the security code input I get from the user.
    How do I pass it to the validator if cannot influence the arguments passed to it?

    I could wrap it together with the User class inside with another class an duse that latter class as the formObject class. I considered it and it is not an elegant and practical solution.

    I hope someone has come across this before and has a solution for me.
Working...
X