Skip to content

Commit

Permalink
update private field opt-in comment
Browse files Browse the repository at this point in the history
  • Loading branch information
deankarn committed Mar 2, 2024
1 parent cec504f commit 364672b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package validator
=================
<img align="right" src="logo.png">[![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)
Expand Down
5 changes: 3 additions & 2 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 364672b

Please sign in to comment.