Announcement Announcement Module
Collapse
No announcement yet.
Spring 3 @Pattern Tag Not Working Correctly Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring 3 @Pattern Tag Not Working Correctly

    Hello,

    I am using a Pattern like this to validate an email address: @Pattern(regexp="[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}", message="Invalid email address.")

    However, Eclipse gives me an error that it has a incorrect escape sequence. From the "help" Eclipse gives me, I see that it's talking about the "\." as this is not one of the "valid" escape sequences it knows about.

    If I remove the "\.", then it stops complaining, but of course, then I'm no longer correctly validating the email address.

    Anyone know why this issue comes up in Eclipse is and how to fix it?

    Thanks.

    -m

  • #2
    hi people
    which api you can find api annotation @Pattern?
    because eclipse not recognize it for me please help me

    Comment


    • #3
      in my case i use jdk 1.6.0_12
      eclise not recognize @Pattern.

      Comment

      Working...
      X