fix: add phone validation to tx survey (closes #5)

This commit is contained in:
Mohamed Sohail 2024-01-31 16:04:43 +03:00
parent b6eec458a0
commit e0e63aaa19
Signed by: kamikazechaser
GPG Key ID: 7DD45520C01CD85D

View File

@ -16,7 +16,8 @@
<TextElement <TextElement
name="phone" name="phone"
label="What is your phone number?" label="What is your phone number?"
rules="required" description="Enter a valid Kenyan phone number starting with 07 or 01 that you registered with."
rules="required|phone"
/> />
<SelectElement <SelectElement
name="tx" name="tx"
@ -44,13 +45,15 @@
<TextElement <TextElement
name="buy" name="buy"
label="Enter the phone number of the counter agent you bought EverGrow from." label="Enter the phone number of the counter agent you bought EverGrow from."
rules="required" rules="required|phone"
description="Enter a valid Kenyan phone number starting with 07 or 01 that you registered with."
:conditions="[['tx', 'buy']]" :conditions="[['tx', 'buy']]"
/> />
<TextElement <TextElement
name="sell" name="sell"
label="Enter the phone number of the customer you sold EverGrow to." label="Enter the phone number of the customer you sold EverGrow to."
rules="required" rules="required|phone"
description="Enter a valid Kenyan phone number starting with 07 or 01 that you registered with."
:conditions="[['tx', 'sell']]" :conditions="[['tx', 'sell']]"
/> />
<DateElement <DateElement