|
DataContextAddFieldValidation Method
|
Adds a new pattern based validation and option error message to a field.
Namespace: GSF.Web.ModelAssembly: GSF.Web (in GSF.Web.dll) Version: 2.4.218-beta
Syntax public void AddFieldValidation(
string observableFieldReference,
string validationPattern,
string errorMessage = null
)
Public Sub AddFieldValidation (
observableFieldReference As String,
validationPattern As String,
Optional errorMessage As String = Nothing
)
public:
void AddFieldValidation(
String^ observableFieldReference,
String^ validationPattern,
String^ errorMessage = nullptr
)
member AddFieldValidation :
observableFieldReference : string *
validationPattern : string *
?errorMessage : string
(* Defaults:
let _errorMessage = defaultArg errorMessage null
*)
-> unit
function AddFieldValidation(observableFieldReference, validationPattern, errorMessage);
View SourceParameters
- observableFieldReference String
- Observable field reference (from JS view model).
- validationPattern String
- Reg-ex based validation pattern.
- errorMessage String (Optional)
- Optional error message to display when pattern fails.
See Also