added client validation.