MCPcopy Index your code
hub / github.com/angular/angular / validateFormGroupControls

Function validateFormGroupControls

packages/forms/src/model/form_group.ts:678–688  ·  view source on GitHub ↗

* Will validate that none of the controls has a key with a dot * Throws other wise

(controls: {
  [K in keyof TControl]: AbstractControl<any, any>;
})

Source from the content-addressed store, hash-verified

676 * Throws other wise
677 */
678function validateFormGroupControls<TControl>(controls: {
679 [K in keyof TControl]: AbstractControl<any, any>;
680}) {
681 const invalidKeys = Object.keys(controls).filter((key) => key.includes('.'));
682 if (invalidKeys.length > 0) {
683 // TODO: make this an error once there are no more uses in G3
684 console.warn(
685 `FormGroup keys cannot include \`.\`, please replace the keys for: ${invalidKeys.join(',')}.`,
686 );
687 }
688}
689
690interface UntypedFormGroupCtor {
691 new (

Callers 1

constructorMethod · 0.85

Calls 4

keysMethod · 0.65
warnMethod · 0.65
joinMethod · 0.65
filterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…