Posted in AJAX jQuery Spring Boot Spring REST

Spring Boot AJAX jQuery to check User Availability Instantly

Introduction Here in this tutorial I am going to show you how to use AJAX technique using jQuery with Spring Boot application to check user availability instantly without refreshing the web page. I am going to use Thymeleaf template in Spring Boot application. I will use Spring REST to create REST API endpoint which will be called from jQuery code….

Continue Reading... Spring Boot AJAX jQuery to check User Availability Instantly
Posted in React JS

Allow only numeric values or digits in input field using React

Introduction In this example I am going to show you how to allow only numeric values or digits in input field using React JS. You may have a requirement where you only need to allow user digits or numeric values for the input field. If user inputs non-numeric values then either you show an error or you do not allow…

Continue Reading... Allow only numeric values or digits in input field using React
Posted in Angular

Allow only numeric values or digits in input field using Angular 10

In this tutorial I am going to show you how to allow users only input numeric values or digits. If users enter non-numeric value then we will show an error message. We can also completely prevent from entering non-numeric values. In this case, we need to accept only numbers for a textbox or input field instead of validating the value…

Continue Reading... Allow only numeric values or digits in input field using Angular 10
Posted in Hibernate Spring Boot

Form Validation in Spring Boot Web Application

Introduction In this example we will see an example on how to validate form in web application using Spring Boot framework. We will use Thymeleaf as a template for UI (user interface) or front-end. We will perform almost all kinds of validations available through Hibernate validator framework. This example just validates the input values and once validated successfully it just…

Continue Reading... Form Validation in Spring Boot Web Application
Posted in Python

How to validate value is numeric using Python

Introduction We will see how to validate a value is numeric or not in Python programming language. Situation may occur when you need to validate the input field’s value is numeric or not. The input field on the form may accept anything unless otherwise you have a client side validation. The user may input anything into the input field and…

Continue Reading... How to validate value is numeric using Python
Posted in Kotlin

Validate Email Address with Regular Expression using Kotlin

Introduction This tutorial will show you how to validate email address with regular expression using Kotlin. In this post, email validation in Kotlin will be done using regular expression or regex pattern. In web applications or standalone applications where we need to send emails to intended recipients, it is recommended to check the valid email address before sending email to…

Continue Reading... Validate Email Address with Regular Expression using Kotlin
Posted in Kotlin

HackerRank Solution: Valid Username Regular Expression using Kotlin

This tutorial will show you how to solve HackerRank Valid Username Checker using Kotlin. In different web applications we define certain rules for choosing the username, such as, it should consists of maximum 30 characters; it should not have any special character; it may contain one or more digits; it must starts with a letter, etc. So here also we…

Continue Reading... HackerRank Solution: Valid Username Regular Expression using Kotlin
Posted in Spring MVC Spring REST

Spring Service Layer Bean Validation

Introduction In my previous tutorial I have shown how to validate input data coming from client or end user to Spring REST Controller. Now in this tutorial I will show you how to validate data in Spring Service Layer. The reason behind validating input data in Service Layer is, input data from client may not always pass through the REST…

Continue Reading... Spring Service Layer Bean Validation
Posted in Spring MVC

Spring MVC Bean Validator

In this example, I will show you how to build a bean validator for User model object.In my previous example, Spring MVC Custom Validator, I have shown how to validate user input. Validating input received from the user to maintain data integrity is an important part of application logic. The Bean Validation model is supported by constraints in the form of…

Continue Reading... Spring MVC Bean Validator
Posted in Spring MVC

Spring MVC Custom Validator

Introduction In this example, I will show you how to build a custom validation (validator) for User model object. This validator is custom implementation of Validator interface. Spring MVC supports validation by means of a validator object that implements the Validator interface. I will write the below validator code in this example to check if the required form fields are…

Continue Reading... Spring MVC Custom Validator