You must check what you want in your criterias and throw exception if incorrect.