Fix regression in registration form: properly validate fields.

Issue #283.