Repository: go-playground/validator
File: cache.go (Go)

Code before:
				current.tag = vals[0]
				if len(current.tag) == 0 {
					panic(strings.TrimSpace(fmt.Sprintf(invalidValidation, fieldName)))
				}

				if wrapper, ok := v.validations[current.tag]; ok {
					current.fn = wrapper.fn
					current.runValidationWhenNil = wrapper.runValidationOnNil
				} else if aliasTag, isAlias := v.aliases[current.tag]; isAlias {
					// Handle alias within OR expression (issue #766)
					// Recursively parse the alias tag
					aliasFirst, aliasLast := v.parseFieldTagsRecursive(aliasTag, fieldName, current.tag, true)

					// Copy the first parsed alias tag's validation data to current
					current.tag = aliasFirst.tag
					current.fn = aliasFirst.fn
					current.runValidationWhenNil = aliasFirst.runValidationWhenNil
					current.hasParam = aliasFirst.hasParam
					current.param = aliasFirst.param
					current.typeof = aliasFirst.typeof
					current.hasAlias = true
					// Note: isBlockEnd is NOT copied here; it will be set at the end of the OR loop

					// If alias expanded to multiple tags, insert them into the chain
					if aliasFirst.next != nil {
						// Save what comes after current in the OR chain
						nextInChain := current.next
						// Link the rest of the alias chain
						current.next = aliasFirst.next
						// Connect the last alias tag to what was after current
						aliasLast.next = nextInChain
						// Clear isBlockEnd since this may not be the last tag in the OR expression
						aliasLast.isBlockEnd = false
						// Update current to point to the last tag in the alias chain
						current = aliasLast
					}
				} else {
					panic(strings.TrimSpace(fmt.Sprintf(undefinedValidation, current.tag, fieldName)))
				}

				if len(orVals) > 1 {
					current.typeof = typeOr
				}

				if len(vals) > 1 {
					current.param = strings.ReplaceAll(strings.ReplaceAll(vals[1], utf8HexComma, ","), utf8Pipe, "|")
				}
			}
			current.isBlockEnd = true
		}
	}

Review comment (suggestion):
The comments are a bit excessive.  
```suggestion
				} else if aliasTag, isAlias := v.aliases[current.tag]; isAlias {
					// Handle alias within OR expression (issue #766)
					// Recursively parse the alias tag
					aliasFirst, aliasLast := v.parseFieldTagsRecursive(aliasTag, fieldName, current.tag, true)
					
					// Note: isBlockEnd is NOT copied here; it will be set at the end of the OR loop
					current.tag = aliasFirst.tag
					current.fn = aliasFirst.fn
					current.runValidationWhenNil = aliasFirst.runValidationWhenNil
					current.hasParam = aliasFirst.hasParam
					current.param = aliasFirst.param
					current.typeof = aliasFirst.typeof
					current.hasAlias = true


					// If alias expanded to multiple tags, insert them into the chain
					if aliasFirst.next != nil {
						nextInChain := current.next
						current.next = aliasFirst.next
						aliasLast.next = nextInChain
						aliasLast.isBlockEnd = false
						current = aliasLast
					}
```

Code after:
				current.tag = vals[0]
				if len(current.tag) == 0 {
					panic(strings.TrimSpace(fmt.Sprintf(invalidValidation, fieldName)))
				}

				if wrapper, ok := v.validations[current.tag]; ok {
					current.fn = wrapper.fn
					current.runValidationWhenNil = wrapper.runValidationOnNil
				} else if aliasTag, isAlias := v.aliases[current.tag]; isAlias {
					aliasFirst, aliasLast := v.parseFieldTagsRecursive(aliasTag, fieldName, current.tag, true)

					current.tag = aliasFirst.tag
					current.fn = aliasFirst.fn
					current.runValidationWhenNil = aliasFirst.runValidationWhenNil
					current.hasParam = aliasFirst.hasParam
					current.param = aliasFirst.param
					current.typeof = aliasFirst.typeof
					current.hasAlias = true

					if aliasFirst.next != nil {
						nextInChain := current.next
						current.next = aliasFirst.next
						aliasLast.next = nextInChain
						aliasLast.isBlockEnd = false
						current = aliasLast
					}
				} else {
					panic(strings.TrimSpace(fmt.Sprintf(undefinedValidation, current.tag, fieldName)))
				}

				if len(orVals) > 1 {
					current.typeof = typeOr
				}

				if len(vals) > 1 {
					current.param = strings.ReplaceAll(strings.ReplaceAll(vals[1], utf8HexComma, ","), utf8Pipe, "|")
				}
			}
			current.isBlockEnd = true
		}
	}
	return
}

func (v *Validate) fetchCacheTag(tag string) *cTag {
	// find cached tag
	ctag, found := v.tagCache.Get(tag)
	if !found {
		v.tagCache.lock.Lock()
		defer v.tagCache.lock.Unlock()