moov-io / customers

Customer registry supporting Know Your Customer (KYC), Customer Identification Program (CIP), and OFAC checks
https://moov.io
Apache License 2.0
69 stars 19 forks source link

meta: convert validation to ozzo #227

Open adamdecaf opened 4 years ago

adamdecaf commented 4 years ago

Customers Version: v0.5.0-dev

What were you trying to do? All data objects need to be properly validated. This involves ensuring their formatting is accepted for the underlying type or they're containing only acceptable characters.

Library: github.com/go-ozzo/ozzo-validation Example: https://github.com/moov-io/identity/blob/master/pkg/client/validation.go

What did you expect to see? Data should only be accepted if it is valid.

Implementation Notes Please do this one package/file at a time. A big change across the project might conflict with other changes in-flight.

vxio commented 4 years ago

We should also add a normalization layer before performing the validations.