FormTypeGuesserChain::guessPattern()

ValueGuess|null guessPattern(string $class, string $property)

Returns a guess about the field's pattern.

  • When you have a min value, you guess a min length of this min (LOW_CONFIDENCE) , lines below
  • If this value is a float type, this is wrong so you guess null with MEDIUM_CONFIDENCE to override the previous guess. Example: You want a float greater than 5, 4.512313 is not valid but length(4.512314) > length(5)

Parameters

string $class The fully qualified class name
string $property The name of the property to guess for

Return Value

ValueGuess|null A guess for the field's required pattern
doc_Symfony
2016-10-28 06:19:18
Comments
Leave a Comment

Please login to continue.