Browse Source

limitating the maximum value of 'quantidade de chuva' input and adding unit of measurement

master
analuizaff 4 years ago
parent
commit
be3870d87b
  1. 4
      src/app/screens/PluviometerSharingDataScreen.js

4
src/app/screens/PluviometerSharingDataScreen.js

@ -23,7 +23,7 @@ const validationSchema = Yup.object().shape({
pluviometer: Yup.number() pluviometer: Yup.number()
.required("Campo obrigatório") .required("Campo obrigatório")
.min(0, "O valor deve ser maior ou igual a 0.") .min(0, "O valor deve ser maior ou igual a 0.")
.max(10000)
.max(999)
.label("pluviometer"), .label("pluviometer"),
//data: Yup.string().required("Campo obrigatório. Por favor, selecione a data"), //data: Yup.string().required("Campo obrigatório. Por favor, selecione a data"),
images: Yup.array(), images: Yup.array(),
@ -70,7 +70,7 @@ function PluviometerSharingDataScreen(props) {
validationSchema={validationSchema} validationSchema={validationSchema}
> >
<View style={{ marginTop: 30, flex: 1 }}> <View style={{ marginTop: 30, flex: 1 }}>
<Text style={styles.labelStyle}>Quantidade de chuva:</Text>
<Text style={styles.labelStyle}>Quantidade de chuva (mm):</Text>
<FormField <FormField
keyboardType="decimal-pad" keyboardType="decimal-pad"
maxLength={200} maxLength={200}

Loading…
Cancel
Save