Added validation functionality
Added validation functionality