Hello,
i want to create a validation rule but i can't seem to get it to work.
I need to validate the text inside my textbox. The format has to be 10 x 10
So, i need to control that i have digit digit space x space digit digit.
Does anyone know how i can do this?
This is what i use now but i keep getting eroors when i don't enter the right format.
Anyone an other solution?
i want to create a validation rule but i can't seem to get it to work.
I need to validate the text inside my textbox. The format has to be 10 x 10
So, i need to control that i have digit digit space x space digit digit.
Does anyone know how i can do this?
This is what i use now but i keep getting eroors when i don't enter the right format.
Anyone an other solution?
VB.NET:
Private Sub txtRuimteVoorScherm_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtRuimteVoorScherm.Leave
Dim strRuimteArray() As String = Split(txtRuimteVoorScherm.Text, " ")
If txtRuimteVoorScherm.Text = Nothing Then
errpZaal.SetError(Me.txtRuimteVoorScherm, "U moet een juiste waarde ingeven")
Else
errpZaal.SetError(Me.txtRuimteVoorScherm, "")
If Not IsNumeric(strRuimteArray(0)) And Not strRuimteArray(1) = "x" And Not IsNumeric(strRuimteArray(2)) Then
errpZaal.SetError(Me.txtRuimteVoorScherm, "U moet een juiste waarde ingeven")
Else
errpZaal.SetError(Me.txtRuimteVoorScherm, "")
End If
End If
End Sub