isValidFieldName
isValidFieldName(
str,strict?):boolean
Defined in: fieldmask.ts:46
A valid field name string must start with a lowercase letter, end with a lower case alphanumeric character (and NOT an underscore) and can only contain lowercase letters, numbers, and underscores. It cannot contain any other characters. It may be as few as one character long.
The FieldMask spec does not allow for wildcards and repeated or map fields must be the last part
of the path. The final argument for this function is strict, which defaults to true. If strict
is true, the function will only allow field masks that are valid according to the spec. However,
the AIP Guidelines allow for wildcards in field masks. So, if you want to
allow wildcards, you can set strict to false. This will allow for field masks with standalone
wildcards or wildcards in repeated or map fields (i.e. '*', 'foo.*', 'foo.*.bar', etc.).
Parameters
Section titled “Parameters”string
strict?
Section titled “strict?”boolean = true
Returns
Section titled “Returns”boolean