Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for isValidConditionReason (0.39 sec)

  1. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go

    var conditionReasonRegexp = regexp.MustCompile("^" + conditionReasonFmt + "$")
    
    // isValidConditionReason tests for a string that conforms to rules for condition reasons. This checks the format, but not the length.
    func isValidConditionReason(value string) []string {
    	if !conditionReasonRegexp.MatchString(value) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Nov 08 01:52:02 UTC 2022
    - 13.5K bytes
    - Viewed (0)
  2. pkg/apis/storagemigration/validation/validation.go

    	}
    
    	if len(condition.Reason) == 0 {
    		allErrs = append(allErrs, field.Required(fldPath.Child("reason"), "must be set"))
    	} else {
    		for _, currErr := range isValidConditionReason(condition.Reason) {
    			allErrs = append(allErrs, field.Invalid(fldPath.Child("reason"), condition.Reason, currErr))
    		}
    
    		const maxReasonLen int = 1 * 1024 // 1024
    		if len(condition.Reason) > maxReasonLen {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 08 04:18:56 UTC 2024
    - 9.5K bytes
    - Viewed (0)
Back to top