[v21.0.0-beta.1] 'Invalid' property & Signal Forms incompatibility
Describe the bug
The invalid property doesn't appear to work with Angular 21's Signal Forms:
Binding to '[invalid]' is not allowed on nodes using the '[field]' directivengtsc(-998022)
Related issue opened on the Angular GitHub: https://github.com/angular/angular/issues/65617
Pull Request Link
No response
Reason for not contributing a PR
- [x] Lack of time
- [ ] Unsure how to implement the fix/feature
- [ ] Difficulty understanding the codebase
- [ ] Other
Other Reason
No response
Reproducer
https://stackblitz.com/edit/github-5aqhxhtg-kirxfpe3?file=src%2Fapp%2Fapp.component.html
Environment
N/A
Angular version
21.0.0
PrimeNG version
v20
Node version
22.17.0
Browser(s)
No response
Steps to reproduce the behavior
https://stackblitz.com/edit/github-5aqhxhtg-kirxfpe3?file=src%2Fapp%2Fapp.component.html
Expected behavior
The invalid property should work, or is there an alternative solution?
As a workaround I use [class.p-invalid]=""
Hi, After reviewing the Angular issue tracker, it seems that there are still many ongoing changes related to form signals. We may need to wait a bit longer until things become more stable. https://x.com/cagataycivici/status/1993708826713845943
There is also this which I encountered, seemingly due to p-textarea [field] binding: cannot read properties of undefined (reading 'subscribe') (other components like input do not have this).
There is also this which I encountered, seemingly due to
p-textarea[field] binding:cannot read properties of undefined (reading 'subscribe')(other components like input do not have this).
Already covered here: https://github.com/primefaces/primeng/issues/19116#issuecomment-3584966691