client andserver side validation