primeng icon indicating copy to clipboard operation
primeng copied to clipboard

<form> tag validation fails in p-dilaog

Open garethlewis opened this issue 10 years ago • 1 comments

When I have a form on a page that uses the validation controls. The validations are fired and everything works as expected. When it placed inside a p-dialog so the form is dynamically shown, the validation does not take effect. This used to work in a older version of NGPrime beta 8, I am now using beta 9. Did anything change in the p-dialog to change detection?

garethlewis avatar Jul 01 '16 11:07 garethlewis

Not a problem. It's the new forms api. If you recreate a FormGroup and that is being used by a form in a dialog, angular forgets about it somehow. This never affected the older forms as you replaced the current instance of the FormBuilder group.

garethlewis avatar Jul 01 '16 12:07 garethlewis