Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a validation framework #179

sunilshetye opened this Issue Feb 19, 2019 · 0 comments


None yet
1 participant
Copy link

sunilshetye commented Feb 19, 2019

Add a validation framework for input of parameters of the blocks on double clicking them. Any input in the popup will be validated. On validation failure, it will highlight that block and ask the user to update it.

Design a simple input box with multiple fields and a submit + cancel buttons. For each input field, add validation types. If any validation passes, treat as success and go to next field. If validation passes for all fields, submit box should close. If validation fails, do not close the submit box and highlight the input field and show error message just below (or above) it.

You may also validate all input fields and show error message for all invalid fields (optional).

On changing the value, the error message must be cleared.

Here are some sample validation types:

  • empty (field can be empty)
  • integer (field can be integer)
  • real (field value can be a real number like 1.2 and 3.4e-4)
  • vectorinteger (field will be of the form [1,20,9])
  • vectorreal (field will be of the form [1,2e-5,9.3])
  • variable (field will be a scilab variable of the form abc)

It should be easy to add more types later. This can also be implemented using a third-party free/libre and open source framework (this should be clearly mentioned in the submission).

e.g. A field can have these validation types: "empty,integer,vectorinteger,variable".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.