M
M
Mad Coder2020-09-23 10:43:40
React
Mad Coder, 2020-09-23 10:43:40

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

1 answer(s)
R
Robur, 2020-09-23
@Robur

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 question

Ask a Question

731 491 924 answers to any question