Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration validation #1380

Merged
merged 2 commits into from
Oct 1, 2019
Merged

Add configuration validation #1380

merged 2 commits into from
Oct 1, 2019

Conversation

krhubert
Copy link
Contributor

@krhubert krhubert commented Sep 30, 2019

close #1376

Add validation for required fields + require minium one signers

@krhubert krhubert added the enhancement New feature or request label Sep 30, 2019
@krhubert krhubert added this to the next milestone Sep 30, 2019
@krhubert krhubert self-assigned this Sep 30, 2019
…rTx is valid. Remove some test as there is require value without default value
@NicolasMahe
Copy link
Member

I add the required flag on all data even if it means that the default config (without envs) is not valid anymore.
Also use function ValidateBasic from authtypes.StdTx

}

Log struct {
Format string
Format string `validate:"required"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add oneof=text json > https://godoc.org/gopkg.in/go-playground/validator.v9#hdr-One_Of

With that, we can remove l149 and we could do the same for the logLevel

@NicolasMahe NicolasMahe merged commit c1bc04a into dev Oct 1, 2019
@NicolasMahe NicolasMahe deleted the feature/config-validation branch October 1, 2019 08:41
@NicolasMahe NicolasMahe changed the title Feature/config validation add configuration validation Oct 25, 2019
@NicolasMahe NicolasMahe added the release:add Pull requests that add something label Oct 25, 2019
@NicolasMahe NicolasMahe changed the title add configuration validation Add configuration validation Oct 25, 2019
@NicolasMahe NicolasMahe mentioned this pull request Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request release:add Pull requests that add something
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve config validation
3 participants