redux-form/redux-form

Field validate function should receive field props

Open

#2,881 opened on 2017年5月3日

GitHub で見る
 (12 comments) (30 reactions) (0 assignees)JavaScript (12,592 stars) (1,683 forks)batch import
enhancementhelp wanted

説明

Are you submitting a bug report or a feature request?

Feature Request

What is the current behavior?

Signature is:

function validate(props, allValues, formProps, name)

What is the expected behavior?

function validate(props, allValues, formProps, name, fieldProps)

(Or)

function validate({ props, allValues, formProps, name, fieldProps })

Other information

I have a setup where the validate definition is decoupled from the ReduxForm.Field's props. I want to be able to change the validation at runtime based on config variables in the WrappedField's props. This needs to be done on a per-field basis.

コントリビューターガイド