Skip to content

Commit

Permalink
Merge branch 'fix-interface-name-regex' into 'release-0.10'
Browse files Browse the repository at this point in the history
Interface: fix good name regex

See merge request Astarte-NG/astarte-dashboard!55
  • Loading branch information
bettio committed Dec 19, 2018
2 parents bc89863 + d473873 commit 312d726
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [0.10.0-beta.3] - Unreleased
### Fixed
- Change recommended interface name regexp.
- Enter key press behavior: close confirm message instead of reloading page.
- Accept `/*` as a valid Data Trigger path.
- Do not show inconsistent data while showing an existing trigger.
Expand Down
2 changes: 1 addition & 1 deletion src/elm/Types/Interface.elm
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ isValidInterfaceName interfaceName =

isGoodInterfaceName : String -> Bool
isGoodInterfaceName interfaceName =
Regex.contains (regex "^([a-z]{2,3}\\.){1,2}[a-zA-z]+\\.[a-zA-Z][a-zA-Z0-9]*$") interfaceName
Regex.contains (regex "^([a-z]{2,}\\.){2,}[A-Z][a-zA-Z0-9]*$") interfaceName


toPrettySource : Interface -> String
Expand Down

0 comments on commit 312d726

Please sign in to comment.