Hi Roman,
Yes, I have placed validation in the layout.
This is the layout in Modules -> Membership -> User -> custom registration form name) -> layout:
Both first name and last name are marked required while adding fields in Modules -> Membership -> User ->
(custom registration form name) -> fields.