To enforce the limit all the time

To enforce the limit that always truncate the value when
it reaches the limit (for example, when entering a
verification code), use MaxLengthEnforcement.enforced in
editable text fields.

This option may give suboptimal user experience when used
with input methods that rely on text composition.
Consider using the truncateAfterCompositionEnds
option when the text field expects arbitrary user input
which may contain CJK characters.
See the Context section for more information.

Code before migration:

TextField

maxLength:

or

TextField

maxLength:

maxLengthEnforced:

true

Code after migration:

TextField

maxLength:

maxLengthEnforcement:

MaxLengthEnforcement

enforced