---
title: "When are error checks carried out in Collect Mobile?"
url: "https://openforis.support/questions/1854/when-are-error-checks-carried-out-in-collect-mobile"
tags: ["collect", "collectmobile"]
status: "accepted"
score: 0
answer_count: 3
asked: "2018-06-26T11:49:50"
last_activity: "2018-07-02T23:10:59"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# When are error checks carried out in Collect Mobile?

Asked by Andras on 2018-06-26

Dear OF Team,

I have noticed recently that in Collect Mobile (CM) when a field has an error check, the validation seems to be done immediately after the field appears on the screen. This means that CM displayes (in case of required field) additionally to the "This field is required!" message the error check message before the user is able to record anything. Of course this can be fixed by testing the field itself for being empty (idm:not-blank). Is that the behavior you wanted? Am I correct in the assumptions above?

Thanks for your help!


## Accepted answer (score 1, by Stefano (OF) on 2018-07-02)

Link: https://openforis.support/questions/1854/when-are-error-checks-carried-out-in-collect-mobile/1864

Hi András,  
Many thanks for testing it, this is something it shouldn't happen.  
We will fix this problem with the next version of Collect Mobile.  
Many thanks,  
Open Foris Team


## Answer (score 0, by Stefano (OF) on 2018-06-28)

Link: https://openforis.support/questions/1854/when-are-error-checks-carried-out-in-collect-mobile/1859

Dear András,  
The error checks are evaluated only when the attributes are not empty, so checking that the field is not blank using the function idm:blank() is useless.  
We will improve the way the error messages are shown in Collect Mobile so that they won't overlap with the entry fields.  
Many thanks,  
Open Foris Team


## Answer (score 0, by Andras on 2018-07-02)

Link: https://openforis.support/questions/1854/when-are-error-checks-carried-out-in-collect-mobile/1862

Dear OF Team,

I have created a simple form with one code attribute (codes: 1, 2, 3) and added a custom error check: Condition to be verified: "$this < 4". Tested with comparison as well, it behaves the same.

As you can see in the attached screen shot, CM (1.6.6 [141]) displayes the error message without recording anything. After selecting any of the options, error messages disappear as expected. If I add idm:not-blank($this) in the Apply when field, only the default "This field is required" is displayed before editing. This looks like CM evaluates the error check while the attribute is empty, unless I'm missing something.

![alt text][1]


  [1]: http://www.openforis.org/support/upfiles/Screenshot_20180702-093923_Collect_.jpg
