Asset validator: validate that trimmed name has length (same as device validator)
This commit is contained in:
parent
9e7a6500d2
commit
f46ba5aa93
@ -64,7 +64,7 @@ public class AssetDataValidator extends DataValidator<Asset> {
|
||||
|
||||
@Override
|
||||
protected void validateDataImpl(TenantId tenantId, Asset asset) {
|
||||
if (StringUtils.isEmpty(asset.getName())) {
|
||||
if (StringUtils.isEmpty(asset.getName()) || asset.getName().trim().length() == 0) {
|
||||
throw new DataValidationException("Asset name should be specified!");
|
||||
}
|
||||
if (StringUtils.contains0x00(asset.getName())) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user