Added server side validation. #2