dhtmlxform validation not workinf for REGEX

Hello good pepole. I want to validate the following patterns
a)all letters
b)all positive digits 5-7
Here is a snippet of the form item for case a) and b) but it it=s not working.Help please.

var formData = [{type: "input", label: "Letters Only", validate:"[A-Za-z]+"}];
var formData = [{type: "input", label: "Numbers Only", validate:"[1-7]+"}];

i have another validation problem.i have a form that expects two date inputs,a start date and an end date.the difference between these two date should be less than or equal to 14.the start date should be a date greater than two weeks(14 days) from today,and the end date should be less than or equal to 14 days from today.how do i handle this in DHTMLX?

CORRECTION…the end date should be less than or equal from 14 days from the start date

Hi

{type: “input”, label: “Letters Only”, value: “”, validate: “^[a-zA-Z]$"}
{type: “input”, label: “All positive 5-7”, value: “”, validate: "^[5-7]
$”}

var d1 = (myForm.getItemValue(“date1”)).getTime();
var d2 = (myForm.getItemValue(“date2”)).getTime();

var days14 = 141000606024;

if (Math.abs(d1-d2) >= days14) {
// not matched
} else {
// matched
}

Thanx Andrei.u r a life saver!! how cn i block users who have not applied for a loan from visiting a page named checkloanstatus.php that uses a formconnector and php sessions,so that i avoid the error that displays wen ids is null?

not sure I understand what you exactly need, but I guess it something like the following:

checkloanstatus.php

[code]<?php

@session_start();

if (!isset($_SESSION[“ids”])) {
header(“Location: page_where_user_can_get_ids.php”);
die();
}

// other code

?>[/code]

page_where_user_can_get_ids.php

[code]<?php

@session_start();
$_SESSION[“ids”] = “some_value”;

?>[/code]

do u have a client solution without using php?

unfortunately I don’t know details of app spec you need. so I can’t suggest anything else