From 364672b909735476d76a982fd3a5e5dc05269388 Mon Sep 17 00:00:00 2001 From: Dean Karn Date: Sat, 2 Mar 2024 11:42:06 -0800 Subject: [PATCH] update private field opt-in comment --- README.md | 2 +- options.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b3e113a1..a6e1d0b5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Package validator ================= [![Join the chat at https://gitter.im/go-playground/validator](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-playground/validator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -![Project status](https://img.shields.io/badge/version-10.18.0-green.svg) +![Project status](https://img.shields.io/badge/version-10.19.0-green.svg) [![Build Status](https://travis-ci.org/go-playground/validator.svg?branch=master)](https://travis-ci.org/go-playground/validator) [![Coverage Status](https://coveralls.io/repos/go-playground/validator/badge.svg?branch=master&service=github)](https://coveralls.io/github/go-playground/validator?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/validator)](https://goreportcard.com/report/github.com/go-playground/validator) diff --git a/options.go b/options.go index 5e1e40de..86a0db21 100644 --- a/options.go +++ b/options.go @@ -15,9 +15,10 @@ func WithRequiredStructEnabled() Option { } } -// WithPrivateFieldValidation activates validation for unexported fields +// WithPrivateFieldValidation activates validation for unexported fields via the use of the `unsafe` package. // -// It's experimental feature that partially uses unsafe package +// By opting into this feature you are acknowledging that you are aware of the risks and accept any current or future +// consequences of using this feature. func WithPrivateFieldValidation() Option { return func(v *Validate) { v.privateFieldValidation = true