您好我想实现大写的表单规范化,例如Normalizing Form Data
const reducer = combineReducers({
// other reducers
form: form.normalize({
normalizing: { // <--- name of the form
upper: value => value && value.toUpperCase(), // normalizer for 'upper' field
phone: normalizePhone, // normalizer for 'phone' field
min: normalizeMin, // normalizer for 'min' field
max: normalizeMax // normalizer for 'max' field
}
})
});
我有100个字段,我不想写每个字段但是传递某种类型的数组,就像那样。
const reducer = combineReducers({
// other reducers
form: form.normalize({
normalizing: { // <--- name of the form
fieldsArray: value => value && value.toUpperCase(), // normalizer for 'upper' field
}
})
});
如何实现这一目标?