Skip to content

Commit ef69da3

Browse files
fix(editor/util/validation): Fix stop name validation.
1 parent 589b6c6 commit ef69da3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/editor/util/validation.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,11 @@ export function validate (
136136
return false
137137
}
138138
case 'TEXT':
139-
if (name === 'stop_name' && locationType !== null && (typeof locationType === 'number' && locationType <= 2)) {
139+
if (name === 'stop_name' &&
140+
!value &&
141+
locationType !== null &&
142+
(typeof locationType === 'number' && locationType <= 2)
143+
) {
140144
return validationIssue('Stop name is required for stop, station, and entrance location types.')
141145
}
142146
if (name === 'route_short_name' && !value && entity && entity.route_long_name) {

0 commit comments

Comments
 (0)