0

anyone know how to make a regular expression to not allow the user to enter numbers in a field? Something seemed to this:

/**
  * @Assert\Regex("/^\w+/")
 */

a greeting. thanks

1 Answer 1

1

Maybe this work. (not tested)

  /**  
   * @Assert\Regex("/^[^0-9]+$/") 
   */
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.