fateh999/react-native-paper-form-builder

Request for 'number' support

Closed this issue · 3 comments

dk253 commented

Once again, I have to thank you for this!

Can I humbly request support for the 'number' type that is supported by the underlying react-hook-form? I may be missing a way to do this, but it sure would be helpful.

Thanks!

D

Can you let me know the detail use case ? Or you want the keyboard to be numeric as that can be done using keyboardType prop as numeric in textInputProps? As TextInput in react native only returns string even when entering numbers.

dk253 commented

Thanks for your patience. It would be nice to set the min and max rules associated with the 'number' fields like in react-hook-form. With just text input I can limit what people type in. For example, I have a field for the year that I need to not exceed the current year.

Actually you can easily do that just with existing version, using validate rule in rules object.