Hi,
I have a Canvas App, This APP is created from SharePoint List.
There are 11 fields that need to be required and 4 fields that require validation.
On clicking Submit button all these validations should be checked
- the border color should change to red if mandatory field is empty
- the border color should change to red if the validation is not matching
- Throw an error label like " The field is empty", "The Zip code pattern is not matching"
The following are the fields to be validated
Person Name (required field validation only )
Zip (mandatory field and requires validation) ,
Home Zip, SSN, DOB (non-mandatory and requires validation)
I am unsure of adding validation to the above fields.
The below code just changes the border color but doesnt show any error label. how do I configure , onsubmit every fields should be validated. only after proper validation, the form should be submitted.
zip*
If(IsMatch(DataCardValue5.Text,"^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$",MatchOptions.Complete), Black, Red)
home zip
If(
Not(IsBlank(DataCardValue48.Text)),
If(
IsMatch(DataCardValue48.Text,"^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$",MatchOptions.Complete),
Black,
Red
),
Black
)
ssn
If(
Not(IsBlank(DataCardValue50.Text)),
If(
IsMatch(DataCardValue50.Text,"^\d{3}-\d{2}-\d{4}$",MatchOptions.Complete),
Black,
Red
),
Black
)
dob:
If(DataCardValue49.SelectedDate < Today(),Black,Red)
Please help