mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
Javascript cleanup; new functionality; added jquery-ui
This commit is contained in:
parent
3bf357bde3
commit
53a0268227
6 changed files with 68 additions and 43 deletions
|
@ -25,6 +25,12 @@ App.Validate.getFieldName = function(elm)
|
|||
}
|
||||
|
||||
App.Validate.Rule = {
|
||||
'username' : function(elm) {
|
||||
if ($(elm).val().trim() != '' && $(elm).val().search(/[^a-zA-Z_]+/) != -1) {
|
||||
return {VALID: false, ERROR: App.Validate.getFieldName(elm) + ' is required'};
|
||||
}
|
||||
return {VALID: true};
|
||||
},
|
||||
'required' : function(elm) {
|
||||
if ($(elm).val().trim() == '') {
|
||||
return {VALID: false, ERROR: App.Validate.getFieldName(elm) + ' is required'};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue