Hi,
I am building a user registration page. Page has a form where user can select his current state and city.
The problem with that is that i cannot load list of cities into the form when the page is being generated.
That's because i show the user only cities from his state, not all of them.
So i generate a form with a list of states and an empty 'cities'. When user selects one of the states, i populate 'cities' with ajax.
Everything works fine, except i don't know how to validate 'cities' correctly and show form errors.
What is the correct way of doing this ?