St. Alphonsus de Liguori, giving advice to a priest on how to help young man in choosing a state of life, also mentions these two elements:
Let the confessor test well the vocation of his penitent, asking whether the penitent has some obstacle to it, due to incapacity, poor health, or the need of his parents. And let him especially weigh his purpose, to see if it is right, i.e., in order to unite himself more closely to God, or to amend the falls of his previous life, or to avoid the dangers of the world. But if the primary end is worldly—in order to lead a more agreeable life, or to free himself from relatives of an unfeeling character, or to please his parents, who push him to this—let him beware of permitting him to enter religious life. For in that case, it is not a true vocation, and entering in this way, without a true vocation, will have a bad outcome. But if the end is good, and no obstacle is present, then neither the confessor, nor anyone else, as St. Thomas teaches, (Quodlib. 3, art. 14), should or can without grave fault impede him, or attempt to dissuade him from the vocation.