Skip to content
This repository has been archived by the owner on Feb 22, 2019. It is now read-only.

Model validations - client and server side #15

Open
pvlasov opened this issue Feb 24, 2015 · 0 comments
Open

Model validations - client and server side #15

pvlasov opened this issue Feb 24, 2015 · 0 comments

Comments

@pvlasov
Copy link
Member

pvlasov commented Feb 24, 2015

In addition to form validators annotations introduce org.nasdanika.cdo.web.validator annotation which supports the following keys:

  • client - synchronous validation on the client. For properties this validation will be performed in setter functions and throw an error if it fails.
  • client-async - asynchronous validation to be performed in $store() or $apply()
  • server - validation on the server side.

The validator annotation shall be applicable to EClasses, features, EOperations and EParameters.

On the server side use Rhino JavaScript engine to execute validation logic. If validation fails, use OK return code, but { error: ... } response. Modify session unmarshal logic to throw an error if the response has error key.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant