This is possible in the context of a Journey: we do support an option where the Journey step will be visible (or skipped) if there is a given value in the form (contains/doesn’t contain/equals/ doesn’t equal). E.g. on a Journey step, you have entered an invoice number without a hyphen, which means it is invalid. You can define a Journey Skippable Step which will appear only when the user makes a mistake and then define a Step Action to retake the user through the Step where they made a mistake.
For more details on this, please check this article.