mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
feat: support multiple country codes for sending SMS (#1557)
* feat: support multiple country code * feat: improve UI * feat: migrate accountItem * fix: Aliyun compatible * fix: phone validate * fix: typo
This commit is contained in:
@ -14,6 +14,8 @@
|
||||
|
||||
package util
|
||||
|
||||
import "sort"
|
||||
|
||||
func DeleteVal(values []string, val string) []string {
|
||||
newValues := []string{}
|
||||
for _, v := range values {
|
||||
@ -23,3 +25,8 @@ func DeleteVal(values []string, val string) []string {
|
||||
}
|
||||
return newValues
|
||||
}
|
||||
|
||||
func ContainsString(values []string, val string) bool {
|
||||
sort.Strings(values)
|
||||
return sort.SearchStrings(values, val) != len(values)
|
||||
}
|
||||
|
Reference in New Issue
Block a user