Little changes in validation. It is working properly now.