The description does not match the code.
"...
You can limit the characters that can be entered into a field using the digits attribute:
This would restrict the digits entered to just "0" and "1". We might want to limit the total number of characters with:
..."