-
Notifications
You must be signed in to change notification settings - Fork 26
Manually validating a dynamically added form #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I was getting the same error but eventually realized the issue was being caused by trying to pass a wrapper element instead of the form itself to the |
That sounds like a good idea. Want to make a contribution? |
I almost wonder if we should just auto-scan a form if there's an attempts to validate it but it's not been scanned. |
According to the logs, the form element itself didn't get scanned. The parent element surrounding the form (a Bootstrap modal) however did:
|
My form contains only hidden inputs. After adding a dummy text input, it worked. Maybe |
Only hidden inputs never would have occurred to me! Returning |
All yours! But please review my other PR. 😂 |
@dahlbyk you still planning to look at this? |
I haven't had a chance yet. up-for-grabs |
Give #105 a try? |
Fix shipped in https://www.npmjs.com/package/aspnet-client-validation/v/0.9.6, please let us know if you still see an issue. |
After adding a form to the DOM (with
watch
enabled), a call toisValid()
fails, when submitting the form:The error
TypeError: formInputUIDs is undefined
occurs ataspnet-client-validation/src/index.ts
Line 770 in f84dcb4
Variables:

Simplified form markup:
The text was updated successfully, but these errors were encountered: