Centre d'apprentissage

Course:

Getting Started with Building Simulation Apps

How to Validate User Inputs Entered into an App


When developing a simulation app of a COMSOL Multiphysics model using the Application Builder, you can include input fields in your app that enable a user to enter a value and thus make changes to the simulation. Examples of this could be increasing the value of an external load or changing the dimensions of the geometry. When including such input fields it is important to provide the user with some guidance on if the values entered are valid. Here, we demonstrate how to add various data validation bounds for parameters and how to include an error message that will display when incompatible data is entered by a user.

Tutorial: Form Objects and Data Validation

The simplified thermal microactuator tutorial model is used for the model example, which a simulation app was developed for previously. Here, the simulation app is extended by validating the data entered by a user for various input fields. Making changes to the app by using the Form Editor is shown. Topics covered in the tutorial video include the following:

  • Overview of relevant Form Objects
    • Text Label
    • Input Field
    • Unit
    • Data Display
  • Input Field form object settings
    • Adding data validation bounds for parameters
    • Entering an error message for data validation

Further Learning


Submit feedback about this page or contact support here.