• Overview
@angular/forms/signals

FormValueControl

interface

A contract for a form control that edits a Field of type TValue. Any component that implements this contract can be used with the Control directive.

API

    
      interface FormValueControl<TValue> extends FormUiControl {}
    
    

value

ModelSignal<TValue>

The value is the only required property in this contract. A component that wants to integrate with the Control directive via this contract, must provide a model() that will be kept in sync with the value of the bound Field.

checked

undefined

The implementing component must not define a checked property. This is reserved for components that want to integrate with the Control directive as a checkbox.

errors

InputSignal<readonly ValidationError[]> | undefined

An input to receive the errors for the field. If implemented, the Control directive will automatically bind errors from the bound field to this input.

disabled

InputSignal<boolean> | undefined

An input to receive the disabled status for the field. If implemented, the Control directive will automatically bind the disabled status from the bound field to this input.

disabledReasons

InputSignal<readonly DisabledReason[]> | undefined

An input to receive the reasons for the disablement of the field. If implemented, the Control directive will automatically bind the disabled reason from the bound field to this input.

readonly

InputSignal<boolean> | undefined

An input to receive the readonly status for the field. If implemented, the Control directive will automatically bind the readonly status from the bound field to this input.

hidden

InputSignal<boolean> | undefined

An input to receive the hidden status for the field. If implemented, the Control directive will automatically bind the hidden status from the bound field to this input.

invalid

InputSignal<boolean> | undefined

An input to receive the invalid status for the field. If implemented, the Control directive will automatically bind the invalid status from the bound field to this input.

pending

InputSignal<boolean> | undefined

An input to receive the pending status for the field. If implemented, the Control directive will automatically bind the pending status from the bound field to this input.

touched

InputSignal<boolean> | ModelSignal<boolean> | OutputRef<boolean> | undefined

An input to receive the touched status for the field. If implemented, the Control directive will automatically bind the touched status from the bound field to this input.

dirty

InputSignal<boolean> | undefined

An input to receive the dirty status for the field. If implemented, the Control directive will automatically bind the dirty status from the bound field to this input.

name

InputSignal<string> | undefined

An input to receive the name for the field. If implemented, the Control directive will automatically bind the name from the bound field to this input.

required

InputSignal<boolean> | undefined

An input to receive the required status for the field. If implemented, the Control directive will automatically bind the required status from the bound field to this input.

min

InputSignal<number | undefined> | undefined

An input to receive the min value for the field. If implemented, the Control directive will automatically bind the min value from the bound field to this input.

minLength

InputSignal<number | undefined> | undefined

An input to receive the min length for the field. If implemented, the Control directive will automatically bind the min length from the bound field to this input.

max

InputSignal<number | undefined> | undefined

An input to receive the max value for the field. If implemented, the Control directive will automatically bind the max value from the bound field to this input.

maxLength

InputSignal<number | undefined> | undefined

An input to receive the max length for the field. If implemented, the Control directive will automatically bind the max length from the bound field to this input.

pattern

InputSignal<readonly RegExp[]> | undefined

An input to receive the value patterns for the field. If implemented, the Control directive will automatically bind the value patterns from the bound field to this input.

Description

A contract for a form control that edits a Field of type TValue. Any component that implements this contract can be used with the Control directive.

Many of the properties declared on this contract are optional. They do not need to be implemented, but if they are will be kept in sync with the field state of the field bound to the Control directive.

Jump to details