1

I have a GWT application which allows the user to enter a cron expression in a TextField. The cron expression is eventually used in a quartz scheduler on the server. I'm wondering is there a way I can validate the expression the user enters without going back to the server?

STW
  • 44,917
  • 17
  • 105
  • 161
Alb
  • 3,601
  • 6
  • 33
  • 38

2 Answers2

0

You can perform your own string parsing or apply a regex.

Take a look at this similar SO question.

Community
  • 1
  • 1
dogbane
  • 266,786
  • 75
  • 396
  • 414
0

Use Bean validation JSR 303 for serverside validation. Here is an example on my blog about how to Write a custom validator for cron expressions http://www.bagdemir.com/2011/04/27/bean-validation-jsr-303-and-validating-cron-expressions-extending-constraints/

Erhan Bagdemir
  • 5,231
  • 6
  • 34
  • 40
  • Erhan, I think the question refers to client side validation. The link: http://www.bagdemir.com/2011/04/27/bean-validation-jsr-303-and-validating-cron-expressions-extending-constraints/ is not found. – leobelizquierdo Jan 19 '16 at 20:31