set a minimum character value in php

Solutions on MaxInterview for set a minimum character value in php by the best coders in the world

showing results for - "set a minimum character value in php"
Henri
15 Jun 2016
1if (strlen($input) < 12)
2{
3   echo "Input is too short, minimum is 12 characters (20 max).";
4}
5elseif(strlen($input) > 20)
6{
7   echo "Input is too long, maximum is 20 characters.";
8}