I have an input field:
<input name="onkirmizi[]" type="text" class="form-control" tabindex="1" >
And I want to give this input field validation which only allows 2 characters allowed. So in this point, I have two questions.
Attribute maxlength
Accepts a positive integer
When this number is reached during dialing, no further input is possible.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Tag INPUT, attr maxlength</title>
</head>
<body>
<form action="handler.php">
<p><input type="text" maxlength="2"></p>
<p><input type="submit" name="submit" value="Submit"></p>
</form>
</body>
</html>