1
0
mirror of https://github.com/aclindsa/ofxgo.git synced 2025-07-01 11:48:38 -04:00

Don't require UIDs to be 36 characters

The spec strongly recommends this, but doesn't strictly require it
This commit is contained in:
2017-03-29 05:41:28 -04:00
parent 1d8ba5c19a
commit 5596cfbf8d
9 changed files with 15 additions and 32 deletions

View File

@ -216,7 +216,9 @@ func (ob *Boolean) String() string {
type UID string
func (ou UID) Valid() (bool, error) {
// The OFX specification recommends that UIDs follow the standard UUID
// 36-character format
func (ou UID) RecommendedFormat() (bool, error) {
if len(ou) != 36 {
return false, errors.New("UID not 36 characters long")
}