Manually trigger form validation?

Is there a way to manually trigger the OnValidate function of New-UDForm?

You see, on my form the user adds an item or items to a list, before I allow submission I check if that list count is greater than 0.

Problem is, if they add the list item last, the validation code to check the count doesn’t fire.

My work around currently is just delete and readd a character in any of the regularly regex validated fields but I don’t think I could release it like that.

Thanks in advance,

There isn’t right now but I can see the need for it. It would be cool to have a Test-UDForm cmdlet to trigger the validation. Would that make sense?

Hey Adam, yeah that would be perfect.

Just anything to manually call the OnValidate portion of the UDForm.

1 Like

Test-UDForm will be available in tonight’s 1.3 build.

You’re the man @adam

Needed this and -scripts for a demo for our director this Friday.

Unrelated but I tried loading up my old v2 dashboard in universal using the v2 framework. Made the changes of removing start-uddashboard and changing endpoint to content and the dynamic page does not work at all.

My non-dynamic pages in the same dashboard work fine. Is that a known bug by chance?

Thanks again,

I’m unaware of an issue with that but I can check it out tomorrow.