Subversion Repositories DevTools

Rev

Rev 5506 | Rev 5658 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5506 Rev 5596
Line 106... Line 106...
106
         End If
106
         End If
107
 
107
 
108
      End If
108
      End If
109
 
109
 
110
   End Function
110
   End Function
111
   '-----------------------------------------------------------------------------------------------------------------
-
 
112
   Public Function Validate ( sFieldName )
-
 
113
 
111
 
-
 
112
   '-----------------------------------------------------------------------------------------------------------------
-
 
113
   Public Function AddPostBack ()
114
      '--- Plant Hidden Tag
114
      '--- Plant Hidden Tag
115
      If NOT bHiddenTagPlanted Then
115
      If NOT bHiddenTagPlanted Then
116
         ' This tag is used by this class to know if the form is posted back
116
         ' This tag is used by this class to know if the form is posted back
117
         Response.write "<input type='hidden' name='"& sPostBackTagName &"' value='true'>"
117
         Response.write "<input type='hidden' name='"& sPostBackTagName &"' value='true'>"
118
         bHiddenTagPlanted = TRUE
118
         bHiddenTagPlanted = TRUE
119
      End If
119
      End If
-
 
120
   End Function
-
 
121
 
-
 
122
   '-----------------------------------------------------------------------------------------------------------------
-
 
123
   Public Function Validate ( sFieldName )
-
 
124
 
-
 
125
      '--- Plant Hidden Tag
-
 
126
      AddPostBack()
120
 
127
 
121
      Call ValidateField ( RequestValue(sFieldName), mobjFieldMap.Item ( Cstr( sFieldName  ) ) )
128
      Call ValidateField ( RequestValue(sFieldName), mobjFieldMap.Item ( Cstr( sFieldName  ) ) )
122
 
129
 
123
      Validate = GetErrorMsg ( sFieldName )
130
      Validate = GetErrorMsg ( sFieldName )
124
 
131
 
Line 497... Line 504...
497
      bHiddenTagPlanted = FALSE
504
      bHiddenTagPlanted = FALSE
498
      bIsPostBack = FALSE      ' When true, form has been submitted and need postback validation
505
      bIsPostBack = FALSE      ' When true, form has been submitted and need postback validation
499
      bIsValidated = FALSE
506
      bIsValidated = FALSE
500
 
507
 
501
 
508
 
502
      InxFieldName         = 0
509
      InxFieldName          = 0
503
      InxIsRequired         = 1
510
      InxIsRequired         = 1
504
      InxIsNumeric         = 2
511
      InxIsNumeric          = 2
505
      InxMinNumericValue      = 3
512
      InxMinNumericValue    = 3
506
      InxMaxNumericValue      = 4
513
      InxMaxNumericValue    = 4
507
      InxIsDate            = 5
514
      InxIsDate             = 5
508
      InxStartDate         = 6
515
      InxStartDate          = 6
509
      InxEndDate            = 7
516
      InxEndDate            = 7
510
      InxMinStringLength      = 8
517
      InxMinStringLength    = 8
511
      InxMaxStringLength      = 9
518
      InxMaxStringLength    = 9
512
      InxRegExp            = 10
519
      InxRegExp             = 10
513
      InxRegExpDescription   = 11
520
      InxRegExpDescription  = 11
514
      mNumOfRules = 12     ' Number of Rules that can be assigned to one field
521
      mNumOfRules           = 12     ' Number of Rules that can be assigned to one field
515
      mLastRuleInx = mNumOfRules - 1
522
      mLastRuleInx = mNumOfRules - 1
516
 
523
 
517
      ReDim maRules ( mNumOfRules, -1 )
524
      ReDim maRules ( mNumOfRules, -1 )
518
 
525
 
519
      'sSESSION_SEPARATOR = "|SEPARATOR|"      ' Make sure it will never show in regexp field
526
      'sSESSION_SEPARATOR = "|SEPARATOR|"      ' Make sure it will never show in regexp field