Skip to content

Commit

Permalink
fix(editor/util/validation): Fix stop name validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup committed Jul 19, 2021
1 parent 589b6c6 commit ef69da3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/editor/util/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ export function validate (
return false
}
case 'TEXT':
if (name === 'stop_name' && locationType !== null && (typeof locationType === 'number' && locationType <= 2)) {
if (name === 'stop_name' &&
!value &&
locationType !== null &&
(typeof locationType === 'number' && locationType <= 2)
) {
return validationIssue('Stop name is required for stop, station, and entrance location types.')
}
if (name === 'route_short_name' && !value && entity && entity.route_long_name) {
Expand Down

0 comments on commit ef69da3

Please sign in to comment.