This tutorial will show you how to validate email address with regular expression using Kotlin. 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 those particular emails for safety purpose. Here we will use regular expression […]
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, […]
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.
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 […]
In this example, I will show you how to build a custom 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 […]
Introduction Given JSON-like content, convert it to valid JSON! The OWASP JSON Sanitizer Project is a simple to use Java library that can be attached at either end of a data-pipeline to help satisfy Postel’s principle: be conservative in what you do, be liberal in what you accept from others. When applied to JSON-like content […]
Before reading this tutorial please go through the tutorial using SSL with jax-ws webservice Download the InstallCert.java from http://blogs.sun.com/andreas/resource/InstallCert.java Install the InstallCert.java 1. Compile the class using “javac InstallCert.java” in command prompt 2. Execute the command “java InstallCert localhost:8443” in command prompt After installation, now you will get following output in command prompt
Introduction The below example shows how to verify that a string contains only numeric value in Java. String may contain float value, double value etc. This example uses regular expression to check a string contains only numeric values. It makes sure that your string should contain only digits and dot(.).