Skip to main content
November 29, 2024
Question

I can navigate to the page even though there is a validation error(regular expressions)

  • November 29, 2024
  • 2 replies
  • 0 views

On an interface, I am setting the following validation using regular expressions.

The format is [3-digit number] - [4-digit number].

Therefore, for example, if I enter a phone number like "080-0000-0000" here, a validation error will occur as shown below.
Naturally, when I press the button, it doesn't submit and it stays on that page.

However, a phenomenon occurred where nothing was submitted and the page changed.
Since it cannot be reproduced, it is difficult to determine the cause.
Do you know the cause?

(Sorry for the screenshots written in Japanese.)

2 replies

sandhyab4212
December 3, 2024

Hi [mention:a7defab4f7f54defbd445e200add6484:e9ed411860ed4f2ba0265705b8793d05] 

can you share code snippet here? so that I will try to help you

misak0001Author
December 17, 2024

I'm sorry, I replied to you right after I received your reply, but my reply was flagged as spam by Appian and I was unable to reply to you.
I hope this reply is not flagged as spam.

The code snippet is below.

a!textField(
label: "yuubin",
labelPosition: local!labelPosition,
/*placeholder: cons!SU_PLACEHOLDER_SELECTVALUE,*/
value: ri!Oubo.yuubin_bangou,
saveInto: ri!Oubo.yuubin_bangou,
refreshAfter: "UNFOCUS",
readOnly: local!readOnlyOW, /* 230321 ri!readOnly, */
validations: if(
regexmatch(
pattern: "^\d{3}-\d{4}$",
searchString: ri!Oubo.yuubin_bangou
),
null(),
cons!SU_MSG_YUUBINFORMAT
)
),