Answer the question
In order to leave comments, you need to log in
Is there a module for React.js that splits a string into last name and middle name?
There is a text field in which the user enters his full name. At the same time, he can write Petrov Ivan Semenovich, or Ivan Petrov Semenovich, or Ivan Semenovich Petrov. Well, or, for example, write together. Does React have a module that will decompose a string and determine where is the last name, where is the first name, and where is the middle name?
Answer the question
In order to leave comments, you need to log in
No. Moreover, it has nothing to do with the reaction. Moreover, even a person will not always be able to divide the name correctly if it is written haphazardly. Any of the parts of the full name can be an arbitrary word, so that no one except the user knows where he has what.
Make separate fields, or require them to be entered in the required format - for example, first the last name, then the first name, then the patronymic, if any.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question