Imagine a dropdown list with search features where I can type or paste some text. What will be the best way to validate my dropdown: A - Comparing the text with the database text after click outside the box B - Clear the dropdown if the user don't click in something in the search list
I definitely wouldn't just clear the box, that could be confusing for some users. Validate and explain the error as needed. You could even use the dropdown itself for validation, and display an error message in lieu of results.
Neither of them : clearing edit box goes no where , it just causes the user to re-enter the text. Clicking outside the box : why outside ? Consider validating the input on pressing ENTER key .