Add validation for ui