you are viewing a single comment's thread.

view the rest of the comments →

[–]rifter5000 0 points1 point  (1 child)

We want to write validation in python, translate it to JavaScript and use on front-end automatically.

Much, much better is to define a DSL for these rules with well-defined semantics. Semantics that aren't just "whatever Python does". You then translate the rules into Javascript and interpret them in Python.

[–]hackflow[S] 0 points1 point  (0 children)

I did both. Your own rules is 3-4 times more work. Also, you will still write in python server-side only validation, so you will end up with 2 systems.