Forum Discussion
Mario
Nimbostratus
Oct 26, 2020verify the length of a value in the header
Currently I need an iRule that verifies the amount of characters that a field has in the header, if a cell phone number arrives (10 digits) it is redirected to a VS, but if a land line number arrives...
Mario
Nimbostratus
Oct 30, 2020I have made this irule, but I do not know how verify the amount of characters
when HTTP_REQUEST_DATA {
set operatorUserId [findstr [HTTP::payload] "<operatorUserId"]
if { [ string tolower $operatorUserId ] contains "10 characters" } {
#log local0. "$operatorUserId "
virtual VS_10_characters
#log local0. "\[HTTP::payload\]: [HTTP::payload]"
}
if { [ string tolower $operatorUserId ] contains "7 characters" } {
#log local0. "$operatorUserId "
virtual VS_7_characters
#log local0. "\[HTTP::payload\]: [HTTP::payload]"
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects