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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Users online (3,943)