pillarName static method
Implementation
static String? pillarName(String? value) {
if (value != null) {
if (value.isEmpty) {
return 'Pillar name can\'t be empty';
}
if (!pillarNameRegExp.hasMatch(value)) {
return 'Pillar name must match pattern : ${pillarNameRegExp.pattern}';
}
if (value.length > pillarNameMaxLength) {
return 'Pillar name must have maximum $pillarNameMaxLength characters';
}
return null;
} else {
return 'Value is null';
}
}