You should use filter_profile(). http://www.question2answer.org/modules.php?module=filter
Useful functions exist in qa-include/qa-filter-basic.php. -> validate_length()
The method to display error is here. http://www.question2answer.org/qa/24985/prevent-duplicate-question-titles?show=25024#a25024
Welcome to the Q&A site for Question2Answer.
If you have a question about Q2A, please ask here, in English.
To report a bug, please create a new issue on Github or ask a question here with the bug tag.
If you just want to try Q2A, please use the demo site.