I need to check whether the input given by the user and restrict if the field value starts with '-','+','_' using YUP validation
Thanks in advance
name: Yup.string()
.required()
.min(5, 'Too short')
.matches(/^[aA-zZ\s]+$/, "Only alphabets are allowed for this field ")
.matches()//code for checking wheather it starts with '+','-','_' if it starts I need to show an error
If you could jus share the regex for the following condition
- Minimum length 5
- No special characters
- Cannot start with '-', '_', '+'