How to stop a form from closing in OKButton_Clicked event handler method?

I am extending a form which has OK and Cancel buttons. This form extends FormRun not RunBaseBatch. Now in my Extension class i copied an event handler for OKButton_Clicked event where i do a validation. This validation is in a different method of the extension class which is called in the event handler method. Now i want to validate a field on that form and throw an error and also stop the form from closing. How can i acheive this

[ExtensionOf(formStr(PCRuntimeConfigurator))]
final class PCRuntimeConfigurator_Form_Extension
{
    ...
    
	public void validateConfigDescription()
    {
        boolean duplicate;

        if(!configurationDescription.text())
        {
            checkFailed("@468");
			// TODO: How to stop the dialog from closing?
        }
		else
        {
            ...
        }
    }

    [FormControlEventHandler(formControlStr(PCRuntimeConfigurator, OKButton), FormControlEventType::Clicked)]
    public static void OKButton_OnClicked(FormControl sender, FormControlEventArgs e)
    {
        boolean duplicate;
		FormRun formRun = sender.formRun();

        formRun.validateConfigDescription();
    }

}

Have you taken a look at another post on the forum?

https://dynamicsuser.net/ax/f/developers/65373/prevent-closing-a-dialog

The verified answer seems to have helped the user figure it out.