Hook-up validation function (bug 863493)

Add client-side validation.