CWA-146 | fixed bug

This commit is contained in:
Oleksandr Sobol
2020-01-08 20:00:14 +02:00
parent e46c653f3b
commit 34de017fb3
3 changed files with 27 additions and 24 deletions
@@ -72,7 +72,7 @@ abstract class NodeListBase with Store {
void validateNodeAddress(String value) {
const pattern =
'^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\$';
'^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\$|^[0-9a-zA-Z.]+\$';
final regExp = RegExp(pattern);
isValid = regExp.hasMatch(value);
errorMessage = isValid ? null : S.current.error_text_node_address;