Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- V := Validator.Create();
- V.AddRule(
- function(myForm : TMyForm)
- begin
- result := myForm.TEdit1;
- end;
- ).NotEmpty().IsInteger().WithMessage('Must be an integer value');
- V.AddRule(
- function(myForm : TMyForm)
- begin
- result := myForm.TEdit2;
- end;
- ).NotEmpty().IsFloat().WithinRange(0,1000).WithMessage('Must be an floating point value between 0 and 1000');
- if not V.Validate() then;
- ....
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement