Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show error message on react native text input

Tags:

react-native

how to show error message on some text input in react native like described in following link for android. Show error tip on edittext in android

like image 802
Waqas Ahmed Avatar asked Feb 01 '17 13:02

Waqas Ahmed


People also ask

How do you display error message below input field in react native?

Simple, straightforward method One way to display error messages is to have a state that stores them. setErrorMessage("Example error message!")

How do I get error message in react?

Using Your Own React Boundaries import { Component } from "react"; export default class ErrorBoundary extends Component { constructor(props) { super(props); this. state = { hasError: false }; } static getDerivedStateFromError(error) { // Update state so the next render will show the fallback UI.


1 Answers

After many searching i have found a good text input component with error showing logic included. Here is the link

enter image description here

like image 103
Waqas Ahmed Avatar answered Sep 16 '22 22:09

Waqas Ahmed