validation for valid IP address

any function is present in Outsystem to check validation for the valid IP address in Outsystems.

Note-

Ip should have the only digit,decimal and comma

pratiksha Dabhade wrote:

any function is present in Outsystem to check validation for the valid IP address in Outsystems.

Note-

Ip should have the only digit,decimal and comma

Hi,

Have u check this one ,


Thanks

Rahul Kumar wrote:

pratiksha Dabhade wrote:

any function is present in Outsystem to check validation for the valid IP address in Outsystems.

Note-

Ip should have the only digit,decimal and comma

Hi,

Have u check this one ,


Thanks

Hello Rahul Kumar,

I want validation for ip address, and your solution for http request

If you are talking about just the format , Can't  you use a simple regex validation  ? 


in case if you want to check the IP address to be within a range etc. You can use something like : https://www.outsystems.com/forge/component-overview/160/utilsipaddress


Cheers 

pratiksha Dabhade wrote:

Rahul Kumar wrote:

pratiksha Dabhade wrote:

any function is present in Outsystem to check validation for the valid IP address in Outsystems.

Note-

Ip should have the only digit,decimal and comma

Hi,

Have u check this one ,


Thanks

Hello Rahul Kumar,

I want validation for ip address, and your solution for http request

You can pass , 

A comma separeted list with IP addresses or Fully Quallified Domain Names. E.g: 127.0.0.1,mydomain.com.

in it's input TrustedAddresses.

And it returns true if the request is coming from a trusted source. This can be from local machine and/or the list of Trusted Addresses.


Thanks


Tushar Panpaliya wrote:

If you are talking about just the format , Can't  you use a simple regex validation  ? 


in case if you want to check the IP address to be within a range etc. You can use something like : https://www.outsystems.com/forge/component-overview/160/utilsipaddress


Cheers 

Even the component has a function to check if an IP address is valid or not. But I personally won't add a new component to my project if it's a simple validation which can be done via regex.  



Ip should have the only digit, decimal and comma- I only want this validation in my field


pratiksha Dabhade wrote:


Ip should have the only digit, decimal and comma- I only want this validation in my field



just google for a regex to validate your IP and use it. No need to add an additional component. 


In case you are getting the IP address as an input and want to restrict anyone from typing in anything invalid at the UI end itself, use this : https://www.outsystems.com/forge/component-overview/647/custom-input-masks

Tushar Panpaliya wrote:

pratiksha Dabhade wrote:


Ip should have the only digit, decimal and comma- I only want this validation in my field



just google for a regex to validate your IP and use it. No need to add an additional component. 


In case you are getting the IP address as an input and want to restrict anyone from typing in anything invalid at the UI end itself, use this : https://www.outsystems.com/forge/component-overview/647/custom-input-masks

okay, means regex validations add-in if condition?

Because i am not able to drag javascript from toolbox to action flow.


Hi, 

If you want to find IP address from text or looking for IP pattern . that can be match to Ip to validate.

Then in this case u can find Ip pattern from below link (or u can google it)- and apply it with Regex_Search in Text extension.

https://stackoverflow.com/questions/5284147/validating-ipv4-addresses-with-regexp


Hope this help,

Thanks

pratiksha Dabhade wrote:

Tushar Panpaliya wrote:

pratiksha Dabhade wrote:


Ip should have the only digit, decimal and comma- I only want this validation in my field



just google for a regex to validate your IP and use it. No need to add an additional component. 


In case you are getting the IP address as an input and want to restrict anyone from typing in anything invalid at the UI end itself, use this : https://www.outsystems.com/forge/component-overview/647/custom-input-masks

okay, means regex validations add-in if condition?

Because i am not able to drag javascript from toolbox to action flow.


Hi
You can pass below regular expression

^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$

in thisThis Component

Hope this helps

pratiksha Dabhade wrote:

any function is present in Outsystem to check validation for the valid IP address in Outsystems.

Note-

Ip should have the only digit,decimal and comma

Hi Pratiksha, Can you give us more information about the use case?

You wanna check an ipv4 or ipv6, is a list of IPs, etc?


Anyway check this sample, I'm using a different pattern that checks whether a string is a valid IP address using the Regex_Search from the Text extension

SyntaxEditor Code Snippet

^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$


 

Check the oml attached


Hope I could help you

Best Regards

Carlos Lessa