Client-side validation rules on Save

  • 2
  • Question
  • Updated 4 years ago
  • Answered
User can split volumes across delivery months.  Need to ensure that volume splits sum up to total volume 

e.g. 1333 + 1333 + 1334 = 4000

Don't want server side validation rule(s).

Ideally, can write client side JavaScript to perform validation whenever user clicks Save.

Please advise if this is possible and any guidance is appreciated.

Thanks, Irvin.


Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb

Posted 4 years ago

  • 2
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Irvin,  take a look at this post:  https://community.skuidify.com/skuid/topics/magic_real_time_error_warning_rendering_using_javascript...   It is a slighty different use case,  but walks through some client side validation processing. 
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Rob,

Thanks for the quick reply.  

I saw the post and my first reaction was that it could be annoying to the end user.  

I think what I really want is a Before Save event hook.  

For starters, I will go follow Chris' lead in this post https://community.skuidify.com/skuid/topics/is-there-a-before-save-event?topic-reply-list%5Bsettings....

Thanks again, Irvin.
(Edited)
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Between meetings with a dash of JavaScript and pinch of AF. :)

Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Well done!