I have a quite complicated, multi-page form within my ruby on rails application (built with wicked gem). My model have two fields which are being validated against each other - date_of_birth and driving_licence_since (there must be at least 17 years between those dates).

Now the problem is that those fields are on different form pages. This means that customer is able to:

  1. Provide his date of birth first.
  2. Progress to next page (date of birth saved in database)
  3. Fill and submit valid at this point licence_since value.
  4. Navigate back to the first page
  5. Change his date of birth so it is invalid.

We have written our validation the way that the customer is not able to save invalid date of birth at any point (all the page specific validations are being run against the model once given page has been reached regardless on what page customer is currently on), however at the moment no error message is being displayed (as the error is attached to the 'licence_since' field which is not being displayed at the current page). Even though it would be easy to display the error message, this doesn't seem to be the perfect solution.

So far we have considered a number of options, but none of those is working for us:

  1. Allowing customer to progress and stop him on the next page - this creates possibility to pass by validations using browser back button.

  2. Clear the licence_since when invalid date of birth is submitted - same issue as above.

  3. My favourite: When an invalid date is supplied, display an extra field below it to alter licence_since field as well.

  4. Redirect customer to the page with licence_since field with message that he can't change date of birth without altering licence_since - this is just rude.

So my question is - are there any standard way of dealing with cross-pages validation issues? What solution would you propose to the problem?

  • Just want to point out that from a UX perspective, what you've described is really edge case. A person's DOB and License Dates aren't something that you can change. Only reason this can happen legitimately if if they made a mistake. An inline validation message on the 2nd field indicating something along the lines of "Check your dates? Your Date of Birth and License Date must be at least 17 years apart". It'll be nice if you can edit both together, but it's just a nice to have.
    – nightning
    Mar 24, 2014 at 19:41
  • If this info is super important that must be correct, then I'd recommend using PatomaS option #3 and throw a speed bump at the user to confirm their data is valid before final submission.
    – nightning
    Mar 24, 2014 at 19:45

1 Answer 1


Since your process involves more than one page and some data is linked, you can not provide an instant response for the validation status, which is desirable, so I see three options

  1. Modify your form so the related fields are on the same page
  2. Add an explanation informing the user about the mechanics of validation and present a unique page at the end with all the data that has errors, that way, the user know what to expect and can fix everything in one go. Of course you should provide all the necessary information for the user to fill each field correctly.
  3. Collect all the answers from page to page and in a final one show the user all the information that he has provided; in that page, give clues to know which one is right and which one is wrong, then the user will have to fix the invalid information on that page and the validation would be synchronous. If you use this method, you have to validate all the information before presenting this last page, you can do it on each page submission or right before presenting the summary page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.