Added basic validation for search