Browse Source

pluviometer screen inputs as required fields

master
analuizaff 4 years ago
parent
commit
a62fde6c07
  1. 2
      src/app/navigation/SharingDataOptionsNavigator.js
  2. 4
      src/app/screens/PluviometerSharingDataScreen.js

2
src/app/navigation/SharingDataOptionsNavigator.js

@ -15,7 +15,7 @@ function SharingDataOptionsNavigator() {
return (
<Stack.Navigator initialRouteName="SharingData">
<Stack.Screen
name="appNavigator"
name="Voltar"
component={AppNavigator}
options={{
headerShown: false

4
src/app/screens/PluviometerSharingDataScreen.js

@ -40,7 +40,7 @@ const validationSchema = Yup.object().shape({
.min(0, "O valor deve ser maior ou igual a 0.")
.max(10000)
.label("pluviometer"),
data: Yup.string().min(1, "Por favor preencha a data"),
data: Yup.string().required("Campo obrigatório. Por favor, selecione a data"),
images: Yup.array(),
});
@ -121,14 +121,12 @@ function PluviometerSharingDataScreen(props) {
>
<View style={{ marginTop: 30, flex: 1 }}>
<Text style={styles.labelStyle}>Quantidade de chuva:</Text>
<View style={{ flex: 1, flexDirection: "row" }}>
<FormField
keyboardType="number-pad"
maxLength={200}
name="pluviometer"
placeholder="Digite a quantidade de chuva"
/>
</View>
</View>
<View style={{ marginTop: 10, flex: 1, borderRadius: 25 }}>

Loading…
Cancel
Save