webshim
webshim copied to clipboard
Extended "ajaxvalidate", new attribute "fieldName"
In some development scenarios, developers have to change input[id|name] in different web pages. Current situations, enforce developers to make input-specific async server validation process for each input[id] or input[name]. Sometimes this server validation process is repetitive and they can not make/write their codes reusable.
By adding new "fieldName" property to "ajaxvalidate" custom validity rule core object, developers can make server codes more reusable and independent from client input[id|name].
Usage 1:
<input type='text'
id='Text1'
neme='UserID'
data-ajaxvalidate='path to async server validation handler'
data-ajaxvalidatefield='Username' />
Usage 2:
<input type='text'
id='Text1'
neme='UserID'
data-ajaxvalidate='{ url: "path to async server validation handler", fieldName: "Username"}' />