validation

validation coded, and it is working correctly.