primeng icon indicating copy to clipboard operation
primeng copied to clipboard

[v21.0.0-beta.1] 'Invalid' property & Signal Forms incompatibility

Open rd-wm opened this issue 1 month ago • 4 comments

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?

rd-wm avatar Nov 25 '25 22:11 rd-wm

As a workaround I use [class.p-invalid]=""

nesgarbo avatar Nov 26 '25 09:11 nesgarbo

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

mertsincan avatar Nov 27 '25 09:11 mertsincan

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).

dr460nf1r3 avatar Nov 29 '25 16:11 dr460nf1r3

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

rd-wm avatar Nov 29 '25 16:11 rd-wm