cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Closy
New Member

C# Validation Plugin

Hey guys.
I'm creating my first Plugin. I want it to validate that SSN is correct. In this case, I want to validate if the CPF is correct (CPF is the same as the SSN - however, in Brazil).

 

On customer creation (table:gbrmad_cliente) I want to validate column gbrmad_strcpf

 

I believe I created the correct logic with REGEX, however, how do I go about creating the registration, after validating? Considering that it will be a new customer (with all data such as: Name and Address)?

Thanks!
Below is the code

Captura de tela 31-01-2022 16.16.24.png

 

Code available here: https://github.com/GabrielPoppes/Treinamento/blob/master/ValidacaoCPF/ValidarCPF.cs

 

1 ACCEPTED SOLUTION

Accepted Solutions
a33ik
MVP

Aha. In this case, I would recommend moving your validation logic to the Client-Side and performing that validation there.

View solution in original post

3 REPLIES 3
a33ik
MVP

Hello,

Can you please explain what do you mean by "creating the registration, after validating"?

Hello. Of course! The Plugin will be used in the customer registration.

However, the client will only be registered after the validation of the gbrmad_strcpf column

 

If the informed document is invalid, I will display the message that it is invalid. If it is valid, I register the customer.

To check if the column is valid, I used a regular expression, but I don't know how the logic is to register the customer after checking.

Thanks.

a33ik
MVP

Aha. In this case, I would recommend moving your validation logic to the Client-Side and performing that validation there.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (4,686)