React js UI example. Highlight textbox instead of error message using jquery validations

React js UI example and template, Highlight textbox instead of error message using jquery validations! . Take a look at this UI example and see how it can enhance your project. Your can copy or download the code and use it in your project. Don't forget to browse our library of other free React Native templates for even more design and functionality inspiration. Happy coding!
Tags: form,validations

1. First, we need fresh reactjs setup, and for that, we need to run below commands into out terminal, and also we should have latest node version installed on our system:

npx create-react-app my-awesome-project

cd my-awesome-project

npm start

2. Now we need to run below commands into our project terminal to get bootstrap and related modules into our reactjs application:

npm install [email protected] --save

npm start //For start project again

3. Finally for the main output, we need to add below code into our my-awesome-project/src/App.js file or if you have fresh setup then you can replace my-awesome-project/src/App.js file code with below code:

import React from 'react';
import './App.css';
import 'bootstrap/dist/css/bootstrap.min.css';


function App() {
  
	return (
		<div>
			<div class="container">
    <div class="col-lg-8">
    						
							<form id="your_form_id" class="form-horizontal" action="" method="POST" name="your_form_id">

								<div class="form-group">
									<label class="col-lg-2 control-label" for="inputEmail1">First Name</label>
									<div class="col-lg-10">
										<input id="first_name" class="required form-control" name="first_name" type="text" placeholder="" /> 
									</div>
								</div>
								
								<div class="form-group">
									<label class="col-lg-2 control-label" for="inputEmail1">Last Name</label>
									<div class="col-lg-10">
										<input id="last_name" class="required form-control" name="last_name" type="text" placeholder="" /> 
									</div>
								</div>
								
								<div class="form-group">
									<label class="col-lg-2 control-label" for="inputEmail1">Email Address</label>
									<div class="col-lg-10">
										<input id="email_address" class="required form-control" name="email_address" type="text" placeholder="" /> 
									</div>
								</div>
								
								<button id="" class="btn btn-default" type="submit">Submit</button>
								
							</form>
							
							</div>
</div>

<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.15.0/jquery.validate.js"></script>
		</div>
	);
}
export default App;

4. Now we need to add below code into our my-awesome-project/src/App.css file :

body{margin-top:20px;}

 .has_error{ border: 1px solid red;}

Similar snippets

React js template and ui example Form send password

Form send password

React js template and ui example Update user profile

Update user profile

React js template and ui example Get in Touch form

Get in Touch form

React js template and ui example Floating label css

Floating label css

React js template and ui example bs5 dark footer

bs5 dark footer

React js template and ui example dark footer

dark footer

React js template and ui example profile with photos and posts

profile with photos and posts

React js template and ui example Product 4 Grid

Product 4 Grid