how to validate special charters.

how to validate special charters.


 i  have problum..

i need to validate my input box with special charters.

EX: if i enter 347.45 it shoould say its is not allowed or else msg.

any hints.
Hi Sattibabu,

It depends what you want to validate.
You want to validate if what you puts in the input is a integer?

Best Regards,
Diogo Miguel

i want to use integer. but if i press special charters like  "dot", "semi column" ect...

it should not allow and give error msg.
is any REGEX() type of function in outsystems or any code or any condition?

any hints..

You can use one Buit-in Function in DataConversion File which is the TextToIntegerValidate.
This function will return a boolean.


TextToIntegerValidate("123456"); returns True
TextToIntegerValidate("12345.78"); returns False

What you have to do is use that function in a If and if the function return True continue the flow but If return False you show an error message, Fedback Message or Validation Message.

Best Regards,
Diogo Miguel
what Diogo said,

if you still need some special regex functionality, in Text.xif you have some regex actions.
actually my requirement is
input box should allow only numbers otherthan numbers the cursor should not go forword..

any hints,

sattibabu vatti.
that's clientside, so you need javascript for that.

perhaps inputmask will work for you otherwise you can create it yourself

basically you are going to handle the onkeydown-event and check which key is pressed.

Hello Sattibabu,

For this requirement you can use the magic of jQuery applied to the input box you want.
You can apply to it a simple script just like:

 $('#" + <Your Input Text ID> + "').keypress(function (e) {
       //if the letter is not digit don't type anything
       if( e.which!=8 && e.which!=0 && (e.which<48 || e.which>57))
       { return false; }

Gonçalo Martins

Don't need to use jquey for it ...its a bit overkill.

Just on the input add a extended property called "onkeypress" in the value write:
"var e = (arguments[0] || window.event); if(e.which!=8 && e.which!=0 && (e.which<48 || e.which>57)) { return false; }"

João Rosado