anz-bank / sysl-go

Communication library used by SYSL-generated code written in Go.
Apache License 2.0
10 stars 14 forks source link

Upgrade the validator package to v10 #229

Closed kasunSF closed 2 years ago

kasunSF commented 2 years ago

Purpose

Please describe the end goal you are trying to achieve that has led you to request this feature.

Currently, the validator is using v9 version. I would suggest using v10 since it has more features.

To be more specific, the v10 validator allows the oneof validation to have the string with spaces which is handy for validating enum fields with space-separated enums.

Usage: oneof=red green
       oneof='red green' 'blue yellow'
       oneof=5 7 9

Suggested approaches

What have you tried, and how might this problem be solved?

AriehSchneier commented 2 years ago

This has now been done

kasunSF commented 2 years ago

Thank you @AriehSchneier

Verified and worked.