Compare commits
4 Commits
ride_valid
...
check-zip-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
924ddaded1 | ||
|
|
d6301ebbf3 | ||
|
|
78d6a45ebb | ||
|
|
22a79cf658 |
@@ -1,15 +1,15 @@
|
||||
package usersroute
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
b64 "encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
"net/http"
|
||||
"encoding/json"
|
||||
"bytes"
|
||||
"strings"
|
||||
|
||||
"bitbucket.org/nemt/nemt-portal-api/application/applicationservice"
|
||||
"bitbucket.org/nemt/nemt-portal-api/application/third/eligibility/bcbsi"
|
||||
@@ -19,8 +19,8 @@ import (
|
||||
"bitbucket.org/nemt/nemt-portal-api/infra/cache"
|
||||
"bitbucket.org/nemt/nemt-portal-api/infra/config"
|
||||
"bitbucket.org/nemt/nemt-portal-api/server/authorization"
|
||||
"bitbucket.org/nemt/nemt-portal-api/server/validation"
|
||||
"bitbucket.org/nemt/nemt-portal-api/server/router/routeutils"
|
||||
"bitbucket.org/nemt/nemt-portal-api/server/validation"
|
||||
"github.com/labstack/echo"
|
||||
"golang.org/x/net/context"
|
||||
"googlemaps.github.io/maps"
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
package validation
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strconv"
|
||||
|
||||
"time"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"regexp"
|
||||
|
||||
"bitbucket.org/nemt/nemt-portal-api/application/viewmodel"
|
||||
"bitbucket.org/nemt/nemt-portal-api/infra/errors"
|
||||
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -36,7 +38,7 @@ func isMixedIDValid(id string) bool {
|
||||
hasLowerCase := false
|
||||
hasNumber := false
|
||||
|
||||
for _, character := range id {
|
||||
for _, character := range (id) {
|
||||
hasUpperCase = hasUpperCase || ((character >= 65) && (character <= 90))
|
||||
hasLowerCase = hasLowerCase || ((character >= 97) && (character <= 122))
|
||||
hasNumber = hasNumber || ((character >= 48) && (character <= 57))
|
||||
@@ -208,5 +210,6 @@ func ValidateRide(requestRide *viewmodel.RideRequest, user *viewmodel.User) []er
|
||||
result = append (result, errors.ValidationError{Field : "trip_type.key", Message : "Step #4 - Choose a Trip Type"})
|
||||
}
|
||||
|
||||
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user