I guess this is fine, probably the error message needs to be more descriptive to tell the user what's wrong