You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simple form library for React Native with great UX for developer and end-user api and some code inspired by [wsmd/react-native-use-form](https://github.com/wsmd/react-native-use-form)
22
21
23
-
24
22
- Autoscroll to next fields with keyboard (iOS/Android)
25
23
- Validation
26
24
- Autoscroll to errors in form if submit validation fails
@@ -38,14 +36,15 @@ See an (older) demo: https://twitter.com/RichardLindhout/status/1344009881863516
38
36
```sh
39
37
yarn add react-native-use-form
40
38
```
39
+
41
40
or
41
+
42
42
```sh
43
43
npm install react-native-use-form
44
44
```
45
45
46
-
47
-
48
46
## Import some localized strings
47
+
49
48
Ideally you do this somewhere in your `index.js` before `react-native-use-form` is used.
50
49
Currently we have en/nl/de/pl/pt/ar/ko/frf translations but it's really easy to add one extra since it are only some labels and error messages.
51
50
@@ -54,21 +53,21 @@ Currently we have en/nl/de/pl/pt/ar/ko/frf translations but it's really easy to
@@ -180,7 +176,6 @@ function TextInputWithError({ errorMessage, ...rest }: React.ComponentProps<type
180
176
);
181
177
}
182
178
183
-
184
179
const telephoneRegex = {
185
180
regex: newRegExp(/^\d+$/),
186
181
errorMessage: 'Telephone is invalid',
@@ -198,8 +193,6 @@ function looksLikeMail(str: string): boolean {
198
193
str.length-lastDotPos>2
199
194
);
200
195
}
201
-
202
-
203
196
```
204
197
205
198
## Contributing
@@ -211,6 +204,7 @@ See the [contributing guide](../CONTRIBUTING.md) to learn how to contribute to t
211
204
MIT
212
205
213
206
### Checkout our other libraries
207
+
214
208
- Simple cross platform navigation library for React Native: [react-native-ridge-navigation](https://github.com/web-ridge/react-native-ridge-navigation)
215
209
- Smooth and fast cross platform Material Design date and time picker for React Native Paper: [react-native-paper-dates](https://github.com/web-ridge/react-native-paper-dates)
216
210
- Smooth and fast cross platform Material Design Tabs for React Native Paper: [react-native-paper-tabs](https://github.com/web-ridge/react-native-paper-tabs)
0 commit comments