Here we kept the columns as 2, so that user just enters 2 characters in the text box. But there seems an issue that when user enters more characters, it is getting accepted by the Oxygen. I have gone through oxy_textfield user guide, but I could not find any attribute which make the text box fixed.

We need to make the text box to be fixed to only allow 2 characters in the field. Is it possible using Oxygen CSS?

Unfortunately, the "columns" property refers only to the size of the form control. It means it will have a width that accommodates two characters. if the user types more, it will not receive any errors.

Currently, the text field form control doesn't have a mechanism to enforce such a behavior, but perhaps we can find some alternatives:
1. If these two characters come from a set of predefined values, you can use a read only combo box form control in which the user can only choose one of the existing values.
2. Through a Schematron rule, you can detect the cases when the user puts more characters and issue a warning. This warning will appear when the user commits the value into the document (in other words, it presses Enter or loses focus)
3. Implement a custom form control that has these checks. You can extend or start from the code of the existing form control to make things easier.

Depending on which path you which to take, I can provide more details about what you should do.