Επεξεργασία

Κοινή χρήση μέσω


Bicep diagnostic code - BCP333

This diagnostic occurs when an assigned string or array is shorter than the allowable length.

Description

The provided value (whose length will always be less than or equal to <length>) is too short to assign to a target for which the minimum allowable length is <min-length>.

Level

Warning / Error

Solution

Assign a string whose length is within the allowable range.

Examples

The following example raises the diagnostic because the value st is shorter than the allowable length:

@minLength(3)
@maxLength(10)
param storageAccountName string = 'st'

You can fix the diagnostic by assigning a string whose length is within the allowable range.

@minLength(3)
@maxLength(10)
param storageAccountName string = 'myStorage'

Next steps

For more information about Bicep diagnostics, see Bicep core diagnostics.