dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #44595
Re: [Dhis2-users] Tracker Capture - Input Fields Validation
Hi Markus,
Your answer is very helpful, but unfortunately we are on version 2.23 and
won't be able to use this.
Is there any way around to achieve the same.
@Calle: Thank you highlighting the loop option, we are also looking for
this to validate the values in DB.
On Mon, Apr 25, 2016 at 6:21 PM, Calle Hedberg <calle.hedberg@xxxxxxxxx>
wrote:
> Markus,
>
> A series of valid expression examples would be very useful, including
> examples using multiple actions.
>
> Can those expressions include lookup functions into other tables or stored
> views in the system?
>
> Regards
> Calle
>
> On 25 April 2016 at 14:37, Markus Bekken <markus.bekken@xxxxxxxxx> wrote:
>
>> Hi Muhammad,
>>
>> There is support for this in the 2.23 release(just out), via the program
>> rules.
>>
>> Right clicking on your program in the programs app, select program rules
>> - and you can create a rule like this:
>>
>> If you also want to validate that the field has a certain pattern, you
>> could expand the rule with a regular expression matching check. The below
>> example checks wether the address field is containing letters and spaces,
>> followed by a space and then a number. The regex is* [\w ]+ \d+ *- notice
>> that the backslashes needs to be escaped:
>>
>> Please have a look, and let us know if we can help with anything!
>>
>> Markus
>>
>> 25. apr. 2016 kl. 07.30 skrev Muhammad Tahir <mtagb09@xxxxxxxxx>:
>>
>> Hi,
>>
>> While working with Tracker Capture, is there any possibility to add
>> validation (Js/jquery validation or any other) via front-end or we have to
>> make changes at code level to achieve this?
>>
>> We have created some fields as TEXT, but want to restrict the length and
>> pattern to restrict users to enter correct data.
>>
>>
>>
>>
>>
>> --
>> *Regards,*
>> *Muhammad Tahir*
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
>
> *******************************************
>
> Calle Hedberg
>
> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>
> Tel/fax (home): +27-21-685-6472
>
> Cell: +27-82-853-5352
>
> Iridium SatPhone: +8816-315-19119
>
> Email: calle.hedberg@xxxxxxxxx
>
> Skype: calle_hedberg
>
> *******************************************
>
>
--
*Regards,*
*Muhammad Tahir*
Follow ups
References