client side validation and layout