leandrohsilveira / react-formctrl

A declarative form controller and validator for ReactJS
https://leandrohsilveira.github.io/react-formctrl/
0 stars 0 forks source link

Incorrect Field component validate property PropType #34

Closed leandrohsilveira closed 7 years ago

leandrohsilveira commented 7 years ago

When a string value is provided to Field component "validate" property, a error log is thrown:

warning.js:35 Warning: Failed prop type: Invalid prop `validate` of type `string` supplied to `Field`, expected an array.
    in Field (created by CustomValidatorForm)
    in CustomValidatorForm (created by CustomValidatorExample)
    in FormControl (created by CustomValidatorExample)
    in div (created by CustomValidatorExample)
    in CustomValidatorExample (created by Routes)
    in div (created by Case)
    in div (created by Case)
    in Case (created by Routes)
    in Page (created by Route)
    in Route (created by Route)
    in Route (created by Routes)
    in div (created by Routes)
    in Routes (created by AppContent)
    in div (created by AppLayout)
    in div (created by AppLayout)
    in AppLayout (created by AppContent)
    in AppContent (created by Route)
    in Route (created by App)
    in Switch (created by App)
    in Router (created by HashRouter)
    in HashRouter (created by App)
    in FormProvider (created by App)
    in App