Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15549

text length validation

$
0
0
Hi,

I have a problem with validation.

Main idea about txbBILL_NR field validation - the minimum number of characters is 4 to select records.
In case the user enters less than 4 characters in the field by pressing the Select button,
the app must display the warning "At least 4 characters must be entered to select entries!".
Until at least 4 characters have been entered, record selection does not have to take place and the result field must be blank.

So I wrote the code, thinking about validation for textbox and this does not working at all.
I think I have a problem with this row "Me.bsBillGrid.DataSource = WSApplicant.Formated.ServiceApplicant.GetBillGrid(New WSApplicant.WS.ArgsBillGrid() With {.BILL_NR = Me.txbBILL_NR.TextLike}).ToSortableBindingList" with datasource. Can not imagine how would it be right.

Please help me with this validation. is it ok?


Code:

If Me.txbBILL_NR.TextLength >= 4 Then
            Me.dgvBill.Visible = True
            Try
                Search()

                If Me.bsBillGrid.Current IsNot Nothing Then
                    Me.dgvBill.Focus()
                End If
            Catch ex As Exception
                Utility.ExceptionManager.HandleException(ex)
            End Try
        End If


Viewing all articles
Browse latest Browse all 15549

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>