redux-form/redux-form

Field validate function should receive field props

オープン

#2,881 opened on 2017/05/03

 (12 件のコメント) (30 件のリアクション) (0 人の担当者)JavaScript (1,683 件のフォーク)batch import
enhancementhelp wanted

Repository metrics

Stars
 (12,592 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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.

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