Hi everyone!
I need help with the validation of a prpyecto I am developing.

I insert some fields, such as those textfields.

When you press the button should perform validation and validated stress fields.
I know this is done with:

<ext:Button runat="server" Text="Validate" OnClientClick="#{FormPanel1}.getForm().isValid();" />

But I can not do so because I need to call a stored procedure, if everything is already validated.

I would like to know how to make a conditional so that if everything is OK, make the registration and validation error if an error message appears.

Protected Sub Button1_DirectClick(ByVal sender As Object, ByVal e As Ext.Net.DirectEventArgs) Handles Button1.DirectClick
If Page.IsValid Then
n.Insert(N1, N2)
MsgBox("Error of validation")
End If
End Sub
End Class

I hope it's understandable.
I need help.

thank you very much for your attention

Sorry for writing but do not speak English.