evolutionValidation

Former Member
Former Member

Is evolutionValidation only used to validate data in input fields, or can it also be used for client-side validation on select boxes and textareas? What can I use to validate select box and textarea input?

Parents Reply Children
  • Former Member
    0 Former Member in reply to Luke R Davidson

    Here you go:

        		<li class="field-item">
    		    #set($countryUserProfileField = $core_v2_userProfileField.Get("Country"))
    		    #set($field = false)
                #set($field = $user.ProfileFields.Get('Country'))
        			<label class="field-item-name" for="$core_v2_widget.UniqueId($countryUserProfileField.Name)">$countryUserProfileField.Title:</label>
        			<span class="field-item-input">
      
                  #foreach ($country in $countries)
                    #beforeall
                    <select id="$core_v2_widget.UniqueId($countryUserProfileField.Name)" name="$core_v2_widget.UniqueId($countryUserProfileField.Name)" class="ui-select country">
                      <option value="">Select</option>
                     #each
                      <option value="$country.iso2"#if ($field && $field.Value != '' && $field.Value == $country.iso2) selected #end>$country.country</option>
      				#afterall
                    </select>
                 #end
        			</span>  
    			    <span class="field-item-validation" style="display: none;"></span>
        		</li>

  • What are you passing to the javascript in the context.country 

  • Former Member
    0 Former Member in reply to Luke R Davidson

    jQuery(function()     
    {
    jQuery.telligent.evolution.widgets.editUser.register({
    		userId: $user.Id,
    		email: '$user.PrivateEmail',
    		wrapperId : '$core_v2_widget.WrapperElementId',
    		saveSuccessText: '$core_v2_encoding.JavascriptEncode($core_v2_language.GetResource('EditProfile_UpdateSuccess'))',
    		saveErrorText: '$core_v2_encoding.JavascriptEncode($core_v2_language.GetResource('EditProfile_SaveError'))',
    		formIncompleteText: '$core_v2_encoding.JavascriptEncode($core_v2_language.GetResource('FormIncompleteText'))',
    		plansUrl : '$core_v2_encoding.JavascriptEncode($core_v2_widget.GetStringValue('plansUrl', 'http://localhost:3000'))',
    		accountType : '#$core_v2_widget.UniqueId('AccountType')',
    	    birthDay : '#$core_v2_widget.UniqueId('day')',
    		birthMonth : '#$core_v2_widget.UniqueId('month')',
    		birthYear : '#$core_v2_widget.UniqueId('year')',
    		gender : '#$core_v2_widget.UniqueId('Gender')',
    		country : '#$core_v2_widget.UniqueId('Country')',
    		region : '#$core_v2_widget.UniqueId('Region')',
    		city : '#$core_v2_widget.UniqueId('City')',
    		displayname : '#$core_v2_widget.UniqueId('DisplayName')',
    		bio : '#$core_v2_widget.UniqueId('UserBio')',
    		workInterests : '#$core_v2_widget.UniqueId('WorkInterests')',
    		experience : '#$core_v2_widget.UniqueId('Experience')',
    		compensation : '#$core_v2_widget.UniqueId('Compensation')'
    });
    });

  • Former Member
    0 Former Member in reply to Former Member

    ... and the name of the profile field is 'Country'.