Input Validation

 
Task Start Date Due Date Priority Progress
Simplify & Clarify Product Messaging
4/3/2018 4/14/2018 Low
Create Action Plan to Improve Customer Engagement
8/8/2017 4/8/2018 Medium
Increase Average Subscription Price
8/9/2017 9/13/2017 Low
Reduce Churn to Less than 1% Monthly
2/12/2018 5/1/2018 Low
Finalize the Content Strategy
3/10/2018 4/11/2018 High
Grow Subscriber Base by 5% per Week
7/24/2017 2/10/2018 Low
Increase the CTR% to Above Industry Average 3.5%
7/11/2017 4/15/2018 Low
Close the Final Budget
6/5/2017 6/18/2017 Low
Achieve Record Metrics in All Areas
4/24/2017 2/3/2018 Low
Begin Content Review
4/27/2017 2/25/2018 Medium
Produce Online Survey
10/14/2017 3/25/2018 Low
Improve Our Content and Its Distribution
4/29/2017 11/9/2017 High
Update Old Content
2/2/2018 4/2/2018 Medium
Map and Analyze Marketing Channels
7/5/2017 4/19/2018 Low
Research and Improve Customer Satisfaction
10/27/2017 4/30/2018 Medium
Present an Action Plan for Next Quarter
6/6/2017 5/11/2018 High
Achieve Record Revenues While Increasing Profitability
10/21/2017 2/28/2018 Low
Hit Quarterly Revenue of Over $1000000
8/30/2017 1/7/2018 Low
Start Sales in 2 New Countries
9/26/2017 10/4/2017 Low
Increase Gross Profit Margin from 54% to 63%
7/14/2017 10/25/2017 Low
Data grid with 37 rows and 6 columns

Our Blazor TreeList uses the standard DataAnnotationsValidator to validate user input (based on data annotation attributes defined in an edit model). The TreeList validates editor values once a user moves focus away from data editors or uses a command that saves changes. In EditCell mode, the TreeList control validates user input when focus moves away from the edited row. The control prevents users from editing a different row until they address all validation errors.

You can implement your custom validator components and declare them in the CustomValidators template. To disable input validation in our Blazor TreeList component, set the ValidationEnabled option to false.

DevExpress Blazor data editors implement the following validation settings:

This demo validates TreeList data against the following rules:

  • The Task field is required.
  • Start Date and Due Date values must belong to the 01/01/2017 — 01/01/2027 interval.
  • The Due Date value cannot be less than the Start Date value.

In this demo, you can use checkboxes in the TreeList toolbar to enable/disable validation and display/hide successful validation results. The Edit Mode combo box allows you to switch between edit modes.

Note: You should not rely on form validation alone to secure your Blazor-powered app. Form validation is designed to improve application usability. A threat actor can bypass validation and send malicious data to the server. To minimize security related threats/risks, you must track data changes using multiple strategies. Refer to the following topic for additional information: Validate User Input.