Is there are any rules for accepting alpha spaces and is there is any alternate solution?
I have also tried with this regex validation.
const v = new Validator(req.body, {
name: 'required|regex:/^[a-zA-Z ]+$/',
});
But getting exception for name = "James Bond" as
The name format is invalid.
After research, I have sorted it out
const v = new Validator(req.body, {
name: 'required|regex:[a-zA-Z][a-zA-Z ]+[a-zA-Z]$',
});