Validate exact words: This post will show you how to validate a string by exact matching with a string. For example you have to validate a field for whether it has yes or no in an input. So the input…
Tag: validation
React Final Form + React DatePicker Implementation with Validations
A working example can be found at Codesandbox React Final Form is a popular Reactjs Plugin for handling forms. On the other hand React DatePicker is another popular ReactJs plugin with almost 5.6M downloads per week. React Final Form’s form…
CSV Content Validation with FormRequest Rules in Laravel
In this example I am going to show and brief my implementation of validating CSV row content with custom CSV Content Validation rule created in FormRequest in my Laravel application. Scenario I need to create a simple custom CSV importer…
Adding multiple Recaptcha and custom form validation with Ajax
It is possible to add multiple Google Recaptcha on single page. Here is an example of adding Google Recaptcha in two different forms and adding custom validation to them. This example illustrates using how response ids are created when rendering of…
Ideal way to perform email validation in php
I found this email validation function while working in ActiveCollab. By default, this function uses PHP’s inbuilt filter_var function to validate email, which is supported in PHP 5 (> 5.2.0). If version of PHP is older (is less than 5.2.0)…
How to use multiple validation rule sets per model in cakephp
As default we have single var $validate rule set in the model class which is triggered on each save() method call while saving form data. This is quite logical and sufficient for single form fields to validate but what if…
Multiple validation rules for a single field in cakephp
Cakephp framework provides a strong model validation mechanism. Here is the quick overview of multiple validation rules applied to a single field. Let say we are using “User.password” and “User.password2” fields to accept/confirm password while registering to a site. We…