Here is the code, but with this linking method, an error appears:
<IMaskInput
type='text'
mask={reGex}
lazy={false}
placeholder="???????"
unmask={true}
value={lastName}
onAccept={ (event) => handlerLastName(event) }
>
{(register) => (
<input
{...register("lastName", {
required: true,
minLength: {
value: 2,
message: "*??????? 2 ???????"
},
maxLength: {
value: 30,
message: "*?? ?????? 30 ????????"
},
onChange: (event) => handlerLastName(event.target.value)
})}
/>
)}
</IMaskInput>
With this binding method, React throws an error with a child element:
Uncaught Error: input is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.